Is it possible for a method other than paint() or update() to output to an applet’s window? Explain how
Yes it is possible for a method other than paint() or update() to output an applet’s window. It is mandatory to obtain a graphics context by invoking getGraphics() method, that is defined Component class. Later use it to output to the window.
Create an instance of the class BufferedImage. Use the method getGraphics(), which returns the Graphics object.
The methods drawOval(), setColor() can be used as
graphics.drawOval(150,150,120,50);
graphics.setColor(Color.green);