1 | This sets background color and initializes applet bounding rectangle to this color |
2 | public void update(Graphics g) { |
3 | g.setColor(getBackground()); |
4 | g.fillRect(0,0,width,height)); |
5 | g.setColor(getForeground(); |
6 | paint(g); |
7 | } |
8 | getBackground() and getForeground() are methods in component class |
9 | fillRect() is a method in Graphics class |