Good ideas and conversation. No ads, no tracking. Login or Take a Tour!
Guys you can draw lines, shapes, characters, and images to the screen inside your applet. Most of the graphics operations in Java are methods defined in the Graphics class. You don’t have to create an instance of Graphics in order to draw something in your applet; in your applet’s paint() method (which you learned about yesterday), you are given a Graphics object. By drawing on that object, you draw onto your applet and the results appear on screen.