<<< Using JFrame class | Index | Using JPanel instead of the default content panel >>> |
Method
frame.getContentPane() // returns a Container object
returns the default content pane of the JFrame
For example,
frame.getContentPane().add( myLabel, BorderLayout.CENTER );
The default content pane is a container that inherits from JComponent
The pane is using the BorderLayout as its layout manager
The default layout manager for JPanel is FlowLayout
<<< Using JFrame class | Index | Using JPanel instead of the default content panel >>> |