StatisticsDialogpublic class StatisticsDialog extends JDialog implements ActionListener
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 void | actionPerformed(java.awt.event.ActionEvent e)
setVisible(false);
| public java.awt.Dimension | getPrefferedSize()
return new Dimension(800, 400);
| public static void | showDialog(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);
|
|