-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGame.java
More file actions
22 lines (19 loc) · 756 Bytes
/
Copy pathGame.java
File metadata and controls
22 lines (19 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import javax.swing.JFrame;
import java.awt.*;
import java.awt.image.BufferedImage;
public class Game {
public static void main (String []args ){
JFrame window = new JFrame ("First Game ");
window.setUndecorated(true);
window.setLayout (null);
window.setResizable(false);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.setContentPane (new GamePanel () );
window.pack();
window.setVisible(true);
window.setLocationRelativeTo (null);
BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Cursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), "blank cursor");
window.getContentPane().setCursor(blankCursor);
}
}