Example usage for javax.swing JMenuBar isBorderPainted

List of usage examples for javax.swing JMenuBar isBorderPainted

Introduction

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

Prototype

public boolean isBorderPainted() 

Source Link

Document

Returns true if the menu bars border should be painted.

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();/* ww  w. j  a  v a 2 s. c o  m*/
    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);

    boolean b = bar.isBorderPainted();

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