--- old/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java 2016-01-25 00:12:59.000000000 +0400 +++ new/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifBorders.java 2016-01-25 00:12:58.000000000 +0400 @@ -687,8 +687,8 @@ int descent = fm.getDescent(); int ascent = fm.getAscent(); Point textLoc = new Point(); - int stringWidth = SwingUtilities2.stringWidth(popup, fm, - title); + int stringWidth = SwingUtilities2.getTextUIDrawing(popup) + .getStringWidth(popup, fm, title); textLoc.y = y + ascent + TEXT_SPACING; textLoc.x = x + ((width - stringWidth) / 2); @@ -697,7 +697,8 @@ g.fillRect(textLoc.x - TEXT_SPACING, textLoc.y - (fontHeight-descent), stringWidth + (2 * TEXT_SPACING), fontHeight - descent); g.setColor(foreground); - SwingUtilities2.drawString(popup, g, title, textLoc.x, textLoc.y); + SwingUtilities2.getTextUIDrawing(popup) + .drawString(popup, g, title, textLoc.x, textLoc.y); MotifGraphicsUtils.drawGroove(g, x, textLoc.y + TEXT_SPACING, width, GROOVE_HEIGHT,