package boundary;

import controller.ExitCtrl;
import controller.PlayerLoadLevelSelectCtrl;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import model.PlayerModel;

/**
 * PlayerMainMenuView for the player application
 *
 * @author Bailey Sheridan
 */
public class PlayerMainMenuView extends JPanel {
  PlayerModel model;
  PlayerApplication app;

  public PlayerMainMenuView(PlayerApplication app, PlayerModel model) {
    this.app = app;
    this.model = model;

    setMinimumSize(new Dimension(600,480));
    setPreferredSize(new Dimension(600, 480));

    GridBagLayout gridBagLayout = new GridBagLayout();

    setLayout(gridBagLayout);

    JPanel panelContent = new JPanel();
    panelContent.setBorder(null);
    panelContent.setSize(300,500);

    add(panelContent);
    panelContent.setLayout(new BoxLayout(panelContent, BoxLayout.Y_AXIS));

    JLabel lblSixesWild = new JLabel("\u262D");
    panelContent.add(lblSixesWild);
    lblSixesWild.setFont(new Font("Matura MT Script Capitals", Font.PLAIN, 26));
    lblSixesWild.setAlignmentX(Component.CENTER_ALIGNMENT);
    lblSixesWild.setAlignmentY(Component.CENTER_ALIGNMENT);

    JButton btnLevelSelect = new JButton("Level Select");
    panelContent.add(btnLevelSelect);
    btnLevelSelect.addActionListener(new PlayerLoadLevelSelectCtrl(app, model));
    btnLevelSelect.setAlignmentX(Component.CENTER_ALIGNMENT);
    btnLevelSelect.setAlignmentY(Component.CENTER_ALIGNMENT);

    JButton btnNewButton = new JButton("Instructions");
    panelContent.add(btnNewButton);
    btnNewButton.setAlignmentX(Component.CENTER_ALIGNMENT);
    btnNewButton.setAlignmentY(Component.CENTER_ALIGNMENT);

    JButton btnExit = new JButton("Exit");
    panelContent.add(btnExit);
    btnExit.addActionListener(new ExitCtrl());
    btnExit.setAlignmentX(Component.CENTER_ALIGNMENT);
    btnExit.setAlignmentY(Component.CENTER_ALIGNMENT);
  }
}

@@ -188,123 +188,14 @@
 dBag
-Constraints;%0Aimport java.awt.GridBagLayout;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener
+Layout
 ;%0Aim
@@ -308,43 +308,8 @@
 el;%0A
-import javax.swing.SwingConstants;%0A
 impo
@@ -413,16 +413,34 @@
 Sheridan
+ & Maurizio Vitale
 %0A */%0Apub
@@ -648,16 +648,36 @@
  model;%0A
+    %0A    //set Sizes
 %0A    set
@@ -756,24 +756,62 @@
 600, 480));%0A
+    %0A    //set Layout to gridBagLayout
 %0A    GridBag
@@ -854,17 +854,16 @@
 yout();%0A
-%0A
     setL
@@ -884,16 +884,61 @@
 ayout);%0A
+    %0A    //make a panel for menu content%0A    
 %0A    JPa
@@ -1042,32 +1042,8 @@
 00);
-%0A%0A    add(panelContent);
 %0A   
@@ -1113,16 +1113,89 @@
 _AXIS));
+%0A    add(panelContent);%0A    %0A    //add labels and buttons to menu content
 %0A%0A    JL

Comment PlayerMainMenuView for better readability