< prev index next >

test/java/awt/GridBagLayout/GridBagLayoutIpadXYTest/GridBagLayoutIpadXYTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -21,11 +21,11 @@
  * questions.
  */
 
 /*
   test
-  @bug 5004032
+  @bug 5004032 8081361
   @summary GridBagConstraints.ipad(x|y) defined in a new way
   @author dav@sparc.spb.su area=
   @run applet GridBagLayoutIpadXYTest.html
 */
 

@@ -79,12 +79,12 @@
             ex.printStackTrace();
             throw new RuntimeException("Unexpected failure");
         }
 
         Dimension minSize = jtf.getMinimumSize();
-        if ( minSize.width + customIpadx != jtf.getSize().width ||
-             minSize.height + customIpady != jtf.getSize().height ){
+        if (!(minSize.width + customIpadx <= jtf.getSize().width) ||
+             !(minSize.height + customIpady <= jtf.getSize().height)){
             System.out.println("TextField originally has min size = " + jtf.getMinimumSize());
             System.out.println("TextField supplied with ipadx =  300, ipady =40");
             System.out.println("Frame size: " + frame.getSize());
             System.out.println(" Fields's size is "+jtf.getSize());
 
< prev index next >