Added .gitignore and application frame class
This commit is contained in:
47
src/dev/kske/minesweeper/Minesweeper.java
Normal file
47
src/dev/kske/minesweeper/Minesweeper.java
Normal file
@ -0,0 +1,47 @@
|
||||
package dev.kske.minesweeper;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
|
||||
|
||||
public class Minesweeper {
|
||||
|
||||
private JFrame mframe;
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
3
src/module-info.java
Normal file
3
src/module-info.java
Normal file
@ -0,0 +1,3 @@
|
||||
module Minesweeper {
|
||||
requires java.desktop;
|
||||
}
|
Reference in New Issue
Block a user