Added more menu items to the help menu that still don't work. It'll need some work.

This commit is contained in:
Deathsbreed 2014-05-27 20:53:29 -05:00
parent 390a1460f2
commit 9f232d9e46

View File

@ -22,6 +22,8 @@ public class SpaceShipSim {
JMenuItem exitItem; JMenuItem exitItem;
JMenu helpMenu; JMenu helpMenu;
JMenuItem instructionsItem;
JMenuItem licenseItem;
JMenuItem aboutItem; JMenuItem aboutItem;
// Constructor: // Constructor:
@ -41,6 +43,8 @@ public class SpaceShipSim {
resetItem = new JMenuItem("Reset"); resetItem = new JMenuItem("Reset");
exitItem = new JMenuItem("Exit"); exitItem = new JMenuItem("Exit");
helpMenu = new JMenu("Help"); helpMenu = new JMenu("Help");
instructionsItem = new JMenuItem("Instructions");
licenseItem = new JMenuItem("License");
aboutItem = new JMenuItem("About"); aboutItem = new JMenuItem("About");
resetItem.addActionListener(new ActionListener() { resetItem.addActionListener(new ActionListener() {
@ -55,6 +59,18 @@ public class SpaceShipSim {
} }
}); });
instructionsItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
// Stuff happens.
}
});
licenseItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
// Stuff happens.
}
});
aboutItem.addActionListener(new ActionListener() { aboutItem.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent ae) { public void actionPerformed(ActionEvent ae) {
@ -67,6 +83,9 @@ public class SpaceShipSim {
simulationMenu.addSeparator(); simulationMenu.addSeparator();
simulationMenu.add(exitItem); simulationMenu.add(exitItem);
helpMenu.add(instructionsItem);
helpMenu.add(licenseItem);
helpMenu.addSeparator();
helpMenu.add(aboutItem); helpMenu.add(aboutItem);
menuBar.add(simulationMenu); menuBar.add(simulationMenu);