--- old/src/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java 2014-07-10 18:18:53.182714800 +0400 +++ new/src/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java 2014-07-10 18:18:52.408116400 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -125,6 +125,9 @@ static void paintXPText(AbstractButton b, Part part, State state, Graphics g, int x, int y, String text, int mnemIndex) { XPStyle xp = XPStyle.getXP(); + if (xp == null) { + return; + } Color textColor = b.getForeground(); if (textColor instanceof UIResource) {