Introduction to OOP | Chapter 22: The AWT and Swing : | next | previous | audio | real | text |
This class is the screen on to which drawing operations are directed.
JPanel can include components (buttons and the like) and can
refine the method paint.
(The overridden method must invoke the parent method, in order to
render features of the window not included in the user constructed
portions).
class MyPanel extends JPanel { ... public void paint (Graphics g) { super.paint(g); ... } }