-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaunch.java
35 lines (26 loc) · 977 Bytes
/
Launch.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package jggames;
import javax.swing.JFrame;
import java.awt.image.BufferedImage;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Toolkit;
public class Launch{
public static void main(String args[]){
System.out.println("Launch started");
Game game = new Game();
JFrame frame = new JFrame("GROUND WAR");
frame.setContentPane(game);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setExtendedState(frame.MAXIMIZED_BOTH);
//BIG thanks to coobird on Stack Overflow for this!
//https://stackoverflow.com/questions/1984071/how-to-hide-cursor-in-a-swing-application
BufferedImage tst = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Cursor cursor = Toolkit.getDefaultToolkit().createCustomCursor(
tst, new Point(0,0), "blank curdsor"
);
frame.getContentPane().setCursor(cursor);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}