1 | public void paint(Graphics g) actually has an argument and draws what you want on the screen |
2 | There is somewhat confusing other methods update() and repaint() which need to used in advanced applications. You may need to call repaint() in a dynamic applet to change display but update() would not need to be called as invoked by repaint(). However update() is sometimes best overridden |
3 | public void repaint() is a request by you to the Java runtime to update screen |
4 | public void update(Graphics g) is invoked by repaint() and performs the screen update which involves clearing screen and invoking paint() |