[ Back | Previous | Next ]

How to setup a debug frame?

Package:
javax.swing.*
Product:
Swing
Release:
1.0.3
Related Links:
ComboBox
JDialog
JFileChooser
JFrame
JOptionPane
JProgressBar
JScrollPane
JTable
General
JTree
JWindow
KeyStroke
LayeredPane
UIDefaults
Comment:
	final JFrame frame = new JFrame("Table");
	frame.addWindowListener(new WindowAdapter() {
		public void windowClosing(WindowEvent e) {
			frame.setVisible(false);
			frame.dispose();
		}
	});

	AmethystJTable tableView = new AmethystJTable();
	tableView.setModel( getModel2() );
	tableView.setCellRenderer( new AmethystCellRenderer() );
	JScrollPane scrollpane = new JScrollPane( tableView );
	scrollpane.setPreferredSize(new Dimension(300,300));
	frame.getContentPane().add(scrollpane);
	frame.pack();
	frame.setVisible(true);
1