Advertisement
Guest User

Game.java

a guest
May 18th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. package game.pong;
  2.  
  3. import javax.swing.JFrame;
  4.  
  5. public class Game extends JFrame{
  6.    
  7.     private static final long serialVersionUID = 3589805788478001754L;
  8.     public static final int WIDTH = 600;
  9.     public static final int HEIGHT = 400;
  10.    
  11.     public Game(){
  12.         setSize(WIDTH, HEIGHT);
  13.         setResizable(false);
  14.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  15.         setLocationRelativeTo(null);
  16.         setTitle("Pong");
  17.        
  18.         add(new Screen());
  19.         setVisible(true);
  20.     }
  21.    
  22.     public static void main(String[] args){
  23.        
  24.         new Game();
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement