formatting and compiling

This commit is contained in:
Cool Guy
2026-04-21 16:20:03 +00:00
parent 76c4dea36a
commit 94e4377364
7 changed files with 103 additions and 106 deletions

View File

@@ -1,23 +1,24 @@
import javax.swing.*;
public class Display {
public static void main(String[] args) throws Exception{
//creating instance of JFrame
int boardWidth = 400;
int boardHeight = 400;
JFrame game = new JFrame();
game.setSize(boardWidth, boardHeight);
game.setVisible(true);
game.setLocationRelativeTo(null);
game.setResizable(false);
Chess chess = new Chess(boardWidth, boardHeight);
game.add(chess);
game.pack();
chess.requestFocus();
}
public static void main(String[] args) throws Exception {
// creating instance of JFrame
int boardWidth = 400;
int boardHeight = 400;
JFrame game = new JFrame();
game.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
game.setSize(boardWidth, boardHeight);
game.setVisible(true);
game.setLocationRelativeTo(null);
game.setResizable(false);
Chess chess = new Chess(boardWidth, boardHeight);
game.add(chess);
game.pack();
chess.requestFocus();
}
}
//images : https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQN6qOyhiUDLlTlwl19PaMTeiY5rSOqkUqu-g&s
// images :
// https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQN6qOyhiUDLlTlwl19PaMTeiY5rSOqkUqu-g&s