-
Notifications
You must be signed in to change notification settings - Fork 0
/
jfm.java
24 lines (24 loc) · 1018 Bytes
/
jfm.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
package build;
import javax.swing.*;
import java.awt.*;
class jfm{
static JFrame jf = new JFrame("Pixel Builder!");
static JLayeredPane jl = new JLayeredPane();
// The reference point - everything will move in the opposite
// direction of the player
static int refx = 0, refy = 0;
static int dx = 800, dy = 800;
static player p;
public static void main(String[] arguments){
// Setting up the JFrame
jf.setSize(dx,dy);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Adding our JLayeredPane as our content pane
jf.setContentPane(jl);
jf.setBackground(Color.BLACK);
// Adding in our player
p = new player();
jf.add(p);
jf.setVisible(true);
}
}