JPanels are containers that are
automatically double buffered
repainted more quickly and smoothly.
It is recommended that a program
creates a simple JPanel
adds the panel to JFrame object
adds all other components to the panel object.
For example,
JPanel jpan = new JPanel(); frame.getContentPane().add( jpan ); JButton jbut = new JButton( "Hello" ); jpan.add( jbut );
See next slide for a complete program.