import java.applet.*;
import java.awt.*;

public class FourRectanglePrinter extends Applet
{

public static Rectangle box;

public void init()
{
box = new Rectangle(10,10,40,40);
System.out.println(box);
box.translate(40,0);
System.out.println(box);
box.translate(0,40);
System.out.println(box);
box.translate(-40,0);
System.out.println(box);

}
public void paint(Graphics g)
{
g.drawRect((int)box.x,(int)box.y,(int)box.getWidth (),(int)box.getHeight());
g.drawRect((int)box.x+40,(int)box.y,(int)box.getWi dth(),(int)box.getHeight());
g.drawRect((int)box.x+40,(int)box.y+40,(int)box.ge tWidth(),(int)box.getHeight());
g.drawRect((int)box.x,(int)box.y+40,(int)box.getWi dth(),(int)box.getHeight());
}


}
thats what i have and i need a screenshot of it but it wont let me take a screenshot of an applet so i was wondering if there was a way to do it as a simple programm