Skip to content

Commit 2439f08

Browse files
hansonrhansonr
authored andcommitted
fix for validate not running when w or h == 0
1 parent 4569409 commit 2439f08

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed
-16 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20181115181231
1+
20181116031148
-16 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20181115181231
1+
20181116031148
-16 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/awt/Container.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,9 +1450,11 @@ public void doLayout() {
14501450
@Deprecated
14511451
public void layout() {
14521452
// called by Component and Container
1453-
if (this.layoutMgr != null && this.width > 0 && this.height > 0) {
1454-
this.layoutMgr.layoutContainer(this);
1455-
}
1453+
// The reason we don't care about w&h is that
1454+
// we can be working just with preferences here.
1455+
// This is when getPreferredSize() is copied to getSize()
1456+
if (layoutMgr != null)//BH out 11/16/18 && this.width > 0 && this.height > 0) {
1457+
layoutMgr.layoutContainer(this);
14561458
}
14571459

14581460
/**

0 commit comments

Comments
 (0)