Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hugh5 committed Oct 28, 2022
1 parent 34bb646 commit 4656737
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
out/
*.iml
14 changes: 14 additions & 0 deletions src/Launcher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import javax.swing.*;

public class Launcher {

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
MainWindow main = new MainWindow();
main.show();
}
});
}
}
17 changes: 17 additions & 0 deletions src/MainWindow.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import javax.swing.*;

public class MainWindow {
private JFrame window;

public MainWindow() {
window = new JFrame();
window.setTitle("Tetris");
window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
window.setSize(800, 500);
window.setLocationRelativeTo(null);
}

public void show() {
window.setVisible(true);
}
}

0 comments on commit 4656737

Please sign in to comment.