--- old/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java 2016-01-25 00:13:05.000000000 +0400 +++ new/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsGraphicsUtils.java 2016-01-25 00:13:04.000000000 +0400 @@ -93,7 +93,8 @@ * reach them from this class */ g.setColor(b.getForeground()); } - SwingUtilities2.drawStringUnderlineCharAt(b, g,text, mnemIndex, x, y); + SwingUtilities2.getTextUIDrawing(b) + .drawStringUnderlineCharAt(b, g,text, mnemIndex, x, y); } else { /*** paint the text disabled ***/ color = getDisabledTextColor(b); if (color == null) { @@ -107,14 +108,14 @@ shadow = b.getBackground().darker(); } g.setColor(shadow); - SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemIndex, + SwingUtilities2.getTextUIDrawing(b).drawStringUnderlineCharAt(b, g, text, mnemIndex, x + 1, y + 1); } if (color == null) { color = b.getBackground().brighter(); } g.setColor(color); - SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemIndex, x, y); + SwingUtilities2.getTextUIDrawing(b).drawStringUnderlineCharAt(b, g, text, mnemIndex, x, y); } } @@ -176,7 +177,7 @@ Point offset = xp.getPoint(b, part, state, Prop.TEXTSHADOWOFFSET); if (offset != null) { g.setColor(shadowColor); - SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemIndex, + SwingUtilities2.getTextUIDrawing(b).drawStringUnderlineCharAt(b, g, text, mnemIndex, x + offset.x, y + offset.y); } @@ -184,7 +185,7 @@ } g.setColor(textColor); - SwingUtilities2.drawStringUnderlineCharAt(b, g, text, mnemIndex, x, y); + SwingUtilities2.getTextUIDrawing(b).drawStringUnderlineCharAt(b, g, text, mnemIndex, x, y); } static boolean isLeftToRight(Component c) {