public static JCheckBox newToggleField() {
final JCheckBox result = new ToggleField();
// CraigM:29/04/2008 - If the check box is not enabled but is focusable, don't let the
// toggle field disabled text be hard to read.
result.setUI(new WindowsCheckBoxUI() {
@Override
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text) {
if (UIManager.getLookAndFeel() instanceof Win32LookAndFeel && result.isEnabled() == false && result.isFocusable()) {
String version = System.getProperty("java.version", ".");