xonecas.io
101
Sh

shapesaver / files

shapesaver / ScreenSaver.java

746 bytes
1/*
2sean caetano martin
3seancaetanomartin@gmail.com
4CIS 255 HY
5ScreenSaver.java
6assignment#5
73/28/11
8*/
9
10import javax.swing.*;
11import java.awt.*;
12
13public class ScreenSaver
14{
15	public static void main (String []args)
16	{
17		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
18		int width = screenSize.width;
19		int height = screenSize.height;
20		DrawPanel panel = new DrawPanel();
21		JFrame application = new JFrame();
22		application.setBackground (Color.BLACK);
23		application.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
24		application.setUndecorated (true);
25		application.setSize (width,height);
26		application.add(panel);
27		application.addMouseMotionListener(panel);
28		application.setVisible(true);
29	}
30}