FileDocCategorySizeDatePackage
StatisticsDialog.javaAPI DocphoneME MR2 API (J2ME)3672Wed May 02 17:59:48 BST 2007view

StatisticsDialog

public class StatisticsDialog extends JDialog implements ActionListener

Fields Summary
Constructors Summary
public StatisticsDialog(Frame frame, String title, boolean param, Object[] objects)

    super(frame, title, param);
    JButton closeButton = new JButton("Close");
    JScrollPane pane = new JScrollPane();
    closeButton.addActionListener(this);
    JTable tbl = new JTable(new StatTableModel(objects));    
    pane.getViewport().setView(tbl);
    getContentPane().add(pane, BorderLayout.CENTER);
    getContentPane().add(closeButton, BorderLayout.PAGE_END);
    pack();
    getRootPane().setDefaultButton(closeButton);
  
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent e)

    setVisible(false);
  
public java.awt.DimensiongetPrefferedSize()

    return new Dimension(800, 400);
  
public static voidshowDialog(java.awt.Component frameComp, java.lang.Object[] objects)

        Frame frame = JOptionPane.getFrameForComponent(frameComp);
        StatisticsDialog dialog = new StatisticsDialog(frame,
                                "Heap Statistics", true, objects);
        dialog.setVisible(true);