<<< Swing Component Hierarchy | Index | SwingMain.java >>> |
Application windows inherit from JFrame class.
Applets inherit from JApplet class.
The JFrame.getContentPane( ) method returns the container where program can
add visible components
modify the layout.
For example,
JButton button = new JButton( "Hello" ); frame.getContentPane().add( button ); // add button to layout
<<< Swing Component Hierarchy | Index | SwingMain.java >>> |