- Common ways to obtain JCheckBoxMenuItem
private void myMethod () {JCheckBoxMenuItem j =
new JCheckBoxMenuItem()
String str;new JCheckBoxMenuItem(str)
Action action;new JCheckBoxMenuItem(action)
- Smart code suggestions by Codota
}
public void paint(Graphics _g) { BuLib.setAntialiasing(this,_g); super.paint(_g); }
public void paint(Graphics g) { super.paint(g); if(shortcut != null) { g.setFont(EnhancedMenuItem.acceleratorFont); g.setColor(getModel().isArmed() ? EnhancedMenuItem.acceleratorSelectionForeground : EnhancedMenuItem.acceleratorForeground); FontMetrics fm = g.getFontMetrics(); Insets insets = getInsets(); g.drawString(shortcut,getWidth() - (fm.stringWidth( shortcut) + insets.right + insets.left + 5), getFont().getSize() + (insets.top - (OperatingSystem.isMacOSLF() ? 0 : 1)) /* XXX magic number */); } } //}}}