Introduction to OOP Chapter 22: The AWT and Swing : next previous audio real text

Panel and JPanel

The window is combined with an instance of class Panel (JPanel in Swing)

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) {
Intro OOP, Chapter 22, Slide 03