Advertisement
TechnoEquinox

TheGame.java

Feb 26th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1. package bailey.connor;
  2.  
  3. import javax.swing.JFrame;
  4. import java.awt.Component;
  5.  
  6. public class TheGame extends JFrame
  7. {
  8.     private static final int WIDTH = 800;
  9.     private static final int HEIGHT = 600;
  10.  
  11.     public TheGame()
  12.     {
  13.         super("One Level");
  14.         setSize(WIDTH, HEIGHT);
  15.  
  16.         Pong game = new Pong();
  17.  
  18.         ((Component) game).setFocusable(true);
  19.         getContentPane().add(game);
  20.  
  21.         setVisible(true);
  22.         setResizable(false);
  23.  
  24.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  25.     }
  26.  
  27.     public static void main(String args[])
  28.     {
  29.         TheGame run = new TheGame();
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement