< prev index next >

src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsInternalFrameTitlePane.java

Print this page

        

@@ -162,11 +162,12 @@
                 titleW = lastIconBounds.x - titleX - gap;
             } else {
                 if (lastIconBounds.x == 0) { // There are no icons
                     lastIconBounds.x = frame.getInsets().left;
                 }
-                titleW = SwingUtilities2.stringWidth(frame, fm, title);
+                titleW = SwingUtilities2.getTextUIDrawing(frame)
+                        .getStringWidth(frame, fm, title);
                 int minTitleX = lastIconBounds.x + lastIconBounds.width + gap;
                 if (xp != null) {
                     minTitleX += 2;
                 }
                 int availableWidth = systemLabel.getX() - gap - minTitleX;

@@ -190,18 +191,20 @@
                                                      Prop.TEXTSHADOWOFFSET);
                     Color shadowColor  = xp.getColor(this, Part.WP_WINDOW, State.ACTIVE,
                                                      Prop.TEXTSHADOWCOLOR, null);
                     if (shadowOffset != null && shadowColor != null) {
                         g.setColor(shadowColor);
-                        SwingUtilities2.drawString(frame, g, title,
+                        SwingUtilities2.getTextUIDrawing(frame)
+                                .drawString(frame, g, title,
                                      titleX + shadowOffset.x,
                                      baseline + shadowOffset.y);
                     }
                 }
             }
             g.setColor(isSelected ? selectedTextColor : notSelectedTextColor);
-            SwingUtilities2.drawString(frame, g, title, titleX, baseline);
+            SwingUtilities2.getTextUIDrawing(frame)
+                    .drawString(frame, g, title, titleX, baseline);
             g.setFont(oldFont);
         }
     }
 
     public Dimension getPreferredSize() {
< prev index next >