Graphic Java

ASSIGNMENT:
Make this, but first try this sample: import java.awt.*; import java.awt.image.*; import java.applet.*; public class squares extends Applet{ public void init(){ setBackground(Color.white); } public void paint(Graphics g){ g.setColor(Color.blue); g.fillRect(80,20,40,160); g.setXORMode(this.getBackground()); g.setColor(Color.red); g.fillRect(20,80,160,40); } }