import java.awt.*;
import javax.swing.*;
public class DigitalMedia extends JFrame
{
private static final Dimension WindowSize = new Dimension(600,600);
public DigitalMedia() {
//Create and set up the window.
this.setTitle("Squarebes");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Display the window, centred on the screen
Dimension screensize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
int x = screensize.width/2 - WindowSize.width/2;
int y = screensize.height/2 - WindowSize.height/2;
setBounds(x, y, WindowSize.width, WindowSize.height);
setVisible(true);
}
public void paint(Graphics g)
{
for (int i = 0; i <= 800; i+= 10)
{
g.fillRect(10,35,20,50);
g.fillRect(10,60,20,50);
}
}
public static void main(
String [ ] args) {
DigitalMedia w = new DigitalMedia();
}
}