- As we know, the paint method of Applet objects is used to display
information on the screen.
- It is called automatically when the applet executes.
- But now, we want to display different information each time the user
enters a new pair of integers.
- We invoke the method repaint(), another method of applet
objects.
- repaint() :
- invokes the update method of Applet objects, which
erases any information on the applet that had been
displayed by invoking paint;
- invokes the paint method.