src/java.desktop/share/classes/javax/swing/JRootPane.java
changeset 47385 8d56044a9850
parent 47216 71c04702a3d5
child 52752 5e7dba63836d
--- a/src/java.desktop/share/classes/javax/swing/JRootPane.java	Wed Oct 11 15:53:25 2017 +0100
+++ b/src/java.desktop/share/classes/javax/swing/JRootPane.java	Thu Oct 12 10:40:45 2017 +0530
@@ -922,7 +922,7 @@
                 rd = new Dimension(Integer.MAX_VALUE,
                         Integer.MAX_VALUE - i.top - i.bottom - mbd.height - 1);
             }
-            return new Dimension(Math.min(rd.width, mbd.width) + i.left + i.right,
+            return new Dimension(Math.max(rd.width, mbd.width) + i.left + i.right,
                                          rd.height + mbd.height + i.top + i.bottom);
         }