using base class (Component) is better
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Mon, 25 May 2015 14:17:06 +0000 (17:17 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Mon, 25 May 2015 14:17:06 +0000 (17:17 +0300)
platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java

index ee4adc19a472914e0a9b10331211412841f0880e..86c119bf6739e225d0778645cbf8bc2c8e666567 100644 (file)
@@ -404,7 +404,7 @@ public class SwingHelper {
     return hyperlink;
   }
 
-  public static void setPreferredWidth(@NotNull JComponent component, int width) {
+  public static void setPreferredWidth(@NotNull Component component, int width) {
     Dimension preferredSize = component.getPreferredSize();
     preferredSize.width = width;
     component.setPreferredSize(preferredSize);