Example usage for javax.swing JMenuItem setOpaque

List of usage examples for javax.swing JMenuItem setOpaque

Introduction

In this page you can find the example usage for javax.swing JMenuItem setOpaque.

Prototype

@BeanProperty(expert = true, description = "The component's opacity")
public void setOpaque(boolean isOpaque) 

Source Link

Document

If true the component paints every pixel within its bounds.

Usage

From source file:org.openmicroscopy.shoola.util.ui.UIUtilities.java

/**
 * Creates a button looking like an hyper-link.
 * //  w  ww.  j a va2 s.co m
 * @param text The text to display
 * @return See above.
 */
public static JMenuItem createHyperLinkMenuItem(String text) {
    if (text == null || text.trim().length() == 0)
        text = "hyperlink";
    JMenuItem b = new JMenuItem(text);
    //Font f = b.getFont();
    //b.setFont(f.deriveFont(f.getStyle(), f.getSize()-2));
    b.setOpaque(false);
    b.setForeground(UIUtilities.HYPERLINK_COLOR);
    unifiedButtonLookAndFeel(b);
    return b;
}