diff --git a/Game_Code/src/Pong_viewAndController.java b/Game_Code/src/Pong_viewAndController.java index c62997a502f2f8275f4b19e365f0e0187cdb1620..11002a179bd1c8ee985a94efea755411353b9b0a 100644 --- a/Game_Code/src/Pong_viewAndController.java +++ b/Game_Code/src/Pong_viewAndController.java @@ -1,15 +1,11 @@ - import java.awt.*; import javax.swing.*; - public class Pong_viewAndController extends JFrame{ - private JButton start = new JButton("Start"); private JButton suspend = new JButton("Suspend"); - private JButton tutorial = new JButton("Tutorial"); + private JButton resume = new JButton("Resume"); private JButton save = new JButton("Save"); private JButton exit = new JButton("Exit"); - - public Pong_viewAndController(){ + public Pong_viewAndController(JFrame frame){ super("FaultInOurPong"); this.setSize(700,500); this.setResizable(false); @@ -20,16 +16,12 @@ public class Pong_viewAndController extends JFrame{ JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS)); - start.setMaximumSize(suspend.getPreferredSize()); - start.setAlignmentX(Component.CENTER_ALIGNMENT); - buttonPanel.add(start); - buttonPanel.add(Box.createVerticalStrut(10)); suspend.setAlignmentX(Component.CENTER_ALIGNMENT); buttonPanel.add(suspend); buttonPanel.add(Box.createVerticalStrut(10)); - tutorial.setMaximumSize(suspend.getPreferredSize()); - tutorial.setAlignmentX(Component.CENTER_ALIGNMENT); - buttonPanel.add(tutorial); + resume.setMaximumSize(suspend.getPreferredSize()); + resume.setAlignmentX(Component.CENTER_ALIGNMENT); + buttonPanel.add(resume); buttonPanel.add(Box.createVerticalStrut(10)); save.setMaximumSize(suspend.getPreferredSize()); save.setAlignmentX(Component.CENTER_ALIGNMENT); @@ -39,14 +31,10 @@ public class Pong_viewAndController extends JFrame{ exit.setAlignmentX(Component.CENTER_ALIGNMENT); buttonPanel.add(exit); - //JPanel west = new JPanel(new GridBagLayout()); - // west.add(buttonPanel); - Game game = new Game(); game_interface.add(buttonPanel); game_interface.add(game); - //add(west,BorderLayout.WEST); add(game_interface); setLocationRelativeTo(null); @@ -54,8 +42,8 @@ public class Pong_viewAndController extends JFrame{ this.setVisible(true); } - public static void main(String[] args){ + /*public static void main(String[] args){ Pong_viewAndController view_controller = new Pong_viewAndController(); - } + }*/ -} +} \ No newline at end of file