previous |
start |
next
Using Inheritance to Customize Frames
- Use inheritance to define complex frames
- public class RectangleFrame extends JFrame
{
public RectangleFrame()
{
add components to content pane
}
}
- Avoid lengthy main method
- Add methods to set up panels etc.
- Turn GUI components into instance variables
previous |
start |
next