21 lines
573 B
Java
21 lines
573 B
Java
import javax.swing.*;
|
|
|
|
public class Display {
|
|
public static void main(String[] args) {
|
|
int boardWidth = 800;
|
|
int boardHeight = 800;
|
|
int tileSize = 20;
|
|
|
|
JFrame game = new JFrame();
|
|
game.setSize(boardWidth, boardHeight);
|
|
game.setVisible(true);
|
|
game.setLocationRelativeTo(null);
|
|
game.setResizable(false);
|
|
|
|
|
|
Platformer platformer = new Platformer(boardWidth, boardHeight, tileSize);
|
|
game.add(platformer);
|
|
game.pack();
|
|
platformer.requestFocus();
|
|
}
|
|
} |