import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.MenuItem;
...
MenuBar mb = frame.getMenuBar();
if ( mb == null )
{
mb = new MenuBar();
frame.setMenuBar( mb );
}
Menu help = mb.getHelpMenu();
if ( help == null )
{
help = new Menu( "Help", false );
mb.setHelpMenu( help );
}
help.add( new MenuItem( "About" ) );
help.addActionListener
(
new ActionListener()
{
/**
* Handle Menu Selection Request
*
* @param e event giving details of selection
*/
public void actionPerformed( ActionEvent e )
{
String command = e.getActionCommand();
if ( command.equals( "About" ) )
{
...
}
}
}
);