Example usage for javax.swing JCheckBoxMenuItem getFont

List of usage examples for javax.swing JCheckBoxMenuItem getFont

Introduction

In this page you can find the example usage for javax.swing JCheckBoxMenuItem getFont.

Prototype

@Transient
public Font getFont() 

Source Link

Document

Gets the font of this component.

Usage

From source file:org.openmicroscopy.shoola.agents.metadata.editor.AnnotationDataUI.java

/**
 * Creates a menu item./*from   ww w.ja va  2 s .com*/
 * 
 * @param index The index associated to the item.
 * @return See above.
 */
private JCheckBoxMenuItem createMenuItem(int index) {
    JCheckBoxMenuItem item = new JCheckBoxMenuItem(NAMES[index]);
    Font f = item.getFont();
    item.setFont(f.deriveFont(f.getStyle(), f.getSize() - 2));
    item.setSelected(filter == index);
    item.addActionListener(this);
    item.setActionCommand("" + index);
    return item;
}