You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
465 B

  1. import javax.swing.*;
  2. import java.awt.*;
  3. public class GameFrame extends JFrame {
  4. GamePanel panel;
  5. GameFrame(){
  6. panel = new GamePanel();
  7. this.add(panel);
  8. this.setTitle("2D Ping-Pong");
  9. this.setResizable(false);
  10. this.setBackground(new Color(31,78,47));
  11. this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12. this.pack();
  13. this.setVisible(true);
  14. this.setLocationRelativeTo(null);
  15. }
  16. }