Advertisement
Guest User

asd

a guest
Nov 28th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. package game;
  2.  
  3. import javax.swing.JFrame;
  4.  
  5. import menu.Menu;
  6.  
  7. public abstract class Game {
  8.  
  9. public static void main(String[] args) throws InterruptedException {
  10. JFrame tetris = new JFrame("Tetris by Winnie");
  11. Menu menu = new Menu();
  12.  
  13. tetris.add(menu);
  14. tetris.pack();
  15. tetris.setLocationRelativeTo(null);
  16. tetris.setVisible(true);
  17. tetris.setResizable(false);
  18. tetris.requestFocus();
  19. tetris.requestFocusInWindow();
  20. tetris.addKeyListener(new TetrominoKeyListener());
  21. tetris.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement