package org.greenstone.gatherer.gui; import java.awt.*; import java.awt.event.*; import javax.swing.*; import org.greenstone.gatherer.Dictionary; import org.greenstone.gatherer.help.HelpFrame; import org.greenstone.gatherer.util.Utility; public class SimpleMenuBar extends JMenuBar implements ActionListener { private String page_name; public SimpleMenuBar(String page_name) { this.page_name = page_name; JMenu help = new JMenu(); help.setIcon(Utility.HELP_ICON); Dictionary.setText(help, "Menu.Help"); JMenuItem help_help = new JMenuItem(); help_help.addActionListener(this); Dictionary.setText(help_help, "Menu.Help"); help.add(help_help); add(Box.createHorizontalGlue()); add(help); } public void actionPerformed(ActionEvent event) { HelpFrame.setView(page_name); } }