|
| The Anatomy of an Applet |
The Simple applet implements thepublic class Simple extends java.applet.Applet { . . . public void paint(Graphics g) { . . . } . . . }paint()method, which is one of the drawing and event-handling methods that every Applet inherits from the AWT Component class.
Drawing
Thepaint()method is one of two display methods that the Component class provides:
paint()- the basic display method. Applets that use graphics primitives (as opposed to displaying only pre-made graphics or Components) implement this method to draw the applet's representation within a browser page.