Skip to content

Commit 6805c2e

Browse files
committed
Letting Window be notified for validation via event 101
1 parent 5ae17aa commit 6805c2e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,9 +2093,10 @@ public void reshape(int x, int y, int width, int height) {
20932093
// windows here as it is done from peer or native code when
20942094
// the window is really resized or moved, otherwise some
20952095
// events may be sent twice
2096-
if (isJ2SWindowButNotJInternalFrame()) {
2097-
needNotify = false;
2098-
}
2096+
// needed because there is no system event to do this in SwingJS
2097+
// if (isJ2SWindowButNotJInternalFrame()) {
2098+
// needNotify = false;
2099+
// }
20992100
// }
21002101

21012102
if (resized) {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,9 @@ public void setVisible(boolean b) {
946946
// this is Component's not JComponent's
947947
if (b) {
948948
show();
949-
秘repaint(); // BH SwingJS needs this, because there is no system event set to do this.
949+
// BH removed because I added in Component needNotify so that a frame setBounds resize
950+
// will adjust its size for the root pane.
951+
//秘repaint(); // BH SwingJS needs this, because there is no system event set to do this.
950952
} else {
951953
hide();
952954
}

0 commit comments

Comments
 (0)