package gradertool.view; import javax.swing.*; import java.awt.*; import java.awt.event.*; /**** * * Class HelpMenu is the "Help" pulldown menu in the GraderToolUI prototype. * */ public class HelpMenu extends JMenu { /** * Constructor for HelpMenu */ public HelpMenu() { super("Help"); /* * Add this item to the menu, with separators in the * appropriate places (per the requirements). */ addSupportItem(); } /** * Add the 'Help' menu item. */ protected void addSupportItem() { /* * Use the standard menu item pattern for the item. */ add(new JMenuItem("Support")).addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { /* * Print a message */ System.out.println(""); } } ); } }