From 34a4eeaf32382c77cdc823089014a16e4958defd Mon Sep 17 00:00:00 2001 From: Berkan Sarp Date: Tue, 31 Jan 2023 23:57:09 +0100 Subject: [PATCH] update GameFrame --- .idea/hellsgamers.iml | 4 ++-- src/main/java/GameFrame.java | 19 ++++++++++++++++++- src/main/java/build-project.sh | 2 +- target/classes/java/build-project.sh | 1 - target/classes/main/java/build-project.sh | 1 - 5 files changed, 21 insertions(+), 6 deletions(-) delete mode 100644 target/classes/java/build-project.sh delete mode 100644 target/classes/main/java/build-project.sh diff --git a/.idea/hellsgamers.iml b/.idea/hellsgamers.iml index db49080..c500079 100644 --- a/.idea/hellsgamers.iml +++ b/.idea/hellsgamers.iml @@ -6,8 +6,8 @@ - - + + diff --git a/src/main/java/GameFrame.java b/src/main/java/GameFrame.java index 91d7414..b6813fb 100644 --- a/src/main/java/GameFrame.java +++ b/src/main/java/GameFrame.java @@ -1,2 +1,19 @@ -public class GameFrame { +import javax.swing.*; +import java.awt.*; + +public class GameFrame extends JFrame { + GamePanel panel; + GameFrame(){ + panel = new GamePanel(); + this.add(panel); + this.setTitle("2D Ping-Pong"); + this.setResizable(false); + this.setBackground(new Color(31,78,47)); + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.pack(); + this.setVisible(true); + this.setLocationRelativeTo(null); + + } + } diff --git a/src/main/java/build-project.sh b/src/main/java/build-project.sh index 9a9a4a3..cc1f786 100644 --- a/src/main/java/build-project.sh +++ b/src/main/java/build-project.sh @@ -1 +1 @@ -#!/usr/bin/bash \ No newline at end of file +#!/bin/bash \ No newline at end of file diff --git a/target/classes/java/build-project.sh b/target/classes/java/build-project.sh deleted file mode 100644 index 9a9a4a3..0000000 --- a/target/classes/java/build-project.sh +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/bash \ No newline at end of file diff --git a/target/classes/main/java/build-project.sh b/target/classes/main/java/build-project.sh deleted file mode 100644 index 9a9a4a3..0000000 --- a/target/classes/main/java/build-project.sh +++ /dev/null @@ -1 +0,0 @@ -#!/usr/bin/bash \ No newline at end of file