FileDocCategorySizeDatePackage
SwingClass.javaAPI DocExample1207Tue Mar 02 12:13:30 GMT 2004org.cookbook.ch08

SwingClass

public class SwingClass extends JFrame
author
Steven Holzner To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Fields Summary
Panel
p
Constructors Summary
public SwingClass()

		super("Swing Example");

		Container contentPane = getContentPane();
		p = new Panel();
		contentPane.add(p);
	
Methods Summary
public static voidmain(java.lang.String[] args)

		final JFrame f = new SwingClass();

		f.setBounds(100, 100, 280, 250);
		f.setVisible(true);
		f.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		
		f.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		});