The bold lines of the following listing implement the paint method. Every applet must implement one or more of the init , start , and paint methods. You'll learn about these methods in the Overview of Applets lesson.
Applets can implement any number of other methods, as well.
Returning to the above code snippet, the Graphics object passed into the paint method represents the applet's onscreen drawing context. The first argument to the Graphics drawString method is the string to draw onscreen. You'll learn all about drawing to the screen in the Creating a User Interface trail.