//
import java.awt.*;
public class Example1 extends BufferedApplet
{
int width = 0, height = 0;
public void render(Graphics g) {
if (width == 0) {
width = bounds().width;
height = bounds().height;
}
// DRAW A CLEAR WHITE BACKGROUND
g.setColor(Color.white);
g.fillRect(0, 0, width, height);
// DRAW A BIG BLACK SQUARE
g.setColor(Color.black);
g.fillRect(width / 4, height / 4, width / 2, height / 2);
}
}