Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1.  
  2. import java.awt.EventQueue;
  3. import javax.swing.JFrame;
  4.  
  5. public class Snake extends JFrame {
  6.  
  7. public Snake() {
  8.  
  9. initUI();
  10. }
  11.  
  12. private void initUI() {
  13.  
  14. add(new Board());
  15.  
  16. setResizable(false);
  17. pack();
  18.  
  19. setTitle("Snake");
  20. setLocationRelativeTo(null);
  21. setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  22. }
  23.  
  24.  
  25. public static void main(String[] args) {
  26.  
  27.  
  28. JFrame ex = new Snake();
  29. ex.setVisible(true);
  30.  
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement