--- old/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 2016-01-25 00:13:14.000000000 +0400 +++ new/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java 2016-01-25 00:13:14.000000000 +0400 @@ -480,11 +480,12 @@ titleW = r.x - titleX - 3; title = getTitle(frame.getTitle(), fm, titleW); } else { - titleX = menuBar.getX() - 2 - - SwingUtilities2.stringWidth(frame,fm,title); + titleX = menuBar.getX() - 2 - SwingUtilities2 + .getTextUIDrawing(frame).getStringWidth(frame, fm, title); } - SwingUtilities2.drawString(frame, g, title, titleX, baseline); + SwingUtilities2.getTextUIDrawing(frame) + .drawString(frame, g, title, titleX, baseline); g.setFont(f); } } @@ -515,7 +516,7 @@ * @return the title. */ protected String getTitle(String text, FontMetrics fm, int availTextWidth) { - return SwingUtilities2.clipStringIfNecessary( + return SwingUtilities2.getTextUIDrawing(frame).getClippedString( frame, fm, text, availTextWidth); } @@ -646,14 +647,16 @@ FontMetrics fm = frame.getFontMetrics(getFont()); String frameTitle = frame.getTitle(); - int title_w = frameTitle != null ? SwingUtilities2.stringWidth( + int title_w = frameTitle != null ? SwingUtilities2 + .getTextUIDrawing(frame).getStringWidth( frame, fm, frameTitle) : 0; int title_length = frameTitle != null ? frameTitle.length() : 0; // Leave room for three characters in the title. if (title_length > 3) { - int subtitle_w = SwingUtilities2.stringWidth( - frame, fm, frameTitle.substring(0, 3) + "..."); + int subtitle_w = SwingUtilities2.getTextUIDrawing(frame) + .getStringWidth(frame, fm, + frameTitle.substring(0, 3) + "..."); width += (title_w < subtitle_w) ? title_w : subtitle_w; } else { width += title_w;