Example usage for javax.swing JMenuBar setHelpMenu

List of usage examples for javax.swing JMenuBar setHelpMenu

Introduction

In this page you can find the example usage for javax.swing JMenuBar setHelpMenu.

Prototype

public void setHelpMenu(JMenu menu) 

Source Link

Document

Sets the help menu that appears when the user selects the "help" option in the menu bar.

Usage

From source file:Main.java

public static void main(String args[]) {
    JFrame f = new JFrame("JRadioButtonMenuItem Sample");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JMenuBar bar = new JMenuBar();
    bar.addNotify();//w  w  w.ja  v a2  s .  c om
    JMenu menu = new JMenu("Options");
    menu.setMnemonic(KeyEvent.VK_O);

    ButtonGroup group = new ButtonGroup();

    JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem("A");
    group.add(menuItem);
    menu.add(menuItem);

    menuItem = new JRadioButtonMenuItem("B");
    group.add(menuItem);
    menu.add(menuItem);

    menuItem = new JRadioButtonMenuItem("C");
    group.add(menuItem);
    menu.add(menuItem);

    bar.add(menu);

    bar.setHelpMenu(menu);

    f.setJMenuBar(bar);
    f.setSize(300, 200);
    f.setVisible(true);
}