minesweeper/src/dev/kske/minesweeper/Minesweeper.java

58 lines
1.1 KiB
Java

package dev.kske.minesweeper;
import java.awt.EventQueue;
import javax.swing.JFrame;
/**
* Project: <strong>Minesweeper</strong><br>
* File: <strong>Minesweeper.java</strong><br>
* Created: <strong>21.03.2019</strong><br>
* Author: <strong>Kai S. K. Engelbart</strong>
*/
public class Minesweeper {
private JFrame mframe;
private Board board;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Minesweeper window = new Minesweeper();
window.mframe.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public Minesweeper() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
mframe = new JFrame();
mframe.setResizable(false);
mframe.setTitle("Minesweeper");
mframe.setBounds(100, 100, 450, 300);
mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
board = new Board(0, 0, 10, 10, 32, 10, mframe);
board.draw();
}
}