|
@ -11,6 +11,7 @@ public class BShip { |
|
|
JPanel thePanel = new JPanel(); |
|
|
JPanel thePanel = new JPanel(); |
|
|
JPanel textPanel = new JPanel(); |
|
|
JPanel textPanel = new JPanel(); |
|
|
JTextArea textArea = new JTextArea(); |
|
|
JTextArea textArea = new JTextArea(); |
|
|
|
|
|
JFrame theFrame = new JFrame("Battleship"); |
|
|
JMenuItem auto; |
|
|
JMenuItem auto; |
|
|
JMenuItem[] boardSize = new JMenuItem[3]; |
|
|
JMenuItem[] boardSize = new JMenuItem[3]; |
|
|
public AIGridGUI grid2; |
|
|
public AIGridGUI grid2; |
|
@ -66,6 +67,14 @@ public class BShip { |
|
|
textPanel.add(textArea); |
|
|
textPanel.add(textArea); |
|
|
thePanel.add(textPanel); |
|
|
thePanel.add(textPanel); |
|
|
|
|
|
|
|
|
|
|
|
thePanel.add(grid2); |
|
|
|
|
|
|
|
|
|
|
|
theFrame.add(thePanel); |
|
|
|
|
|
theFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); |
|
|
|
|
|
theFrame.setJMenuBar(bar); |
|
|
|
|
|
theFrame.setBounds(0,0,500,750); |
|
|
|
|
|
theFrame.setVisible(true); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public class NewGameListener implements ActionListener { |
|
|
public class NewGameListener implements ActionListener { |
|
|