Skip to content

Commit 8e8c636

Browse files
hansonrhansonr
authored andcommitted
AWT Frame default close operation; JFrame setVisible(true)
AWT has OPERATION_DO_NOTHING default for window closing JFrame should set domNode visibility along with outerNode in setVisible(true);
1 parent e6ded00 commit 8e8c636

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sources/net.sf.j2s.java.core/src/swingjs/a2s/Frame.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public Frame(GraphicsConfiguration gc) {
3636
public Frame(String title, GraphicsConfiguration gc) {
3737
super(title, gc);
3838
listener = new A2SListener();
39+
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
3940
Util.setAWTWindowDefaults(this);
4041
}
4142

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSFrameUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public void setVisible(boolean b) {
344344
}
345345
DOMNode.setVisible(modalNode, b);
346346
}
347-
347+
DOMNode.setVisible(domNode, b);
348348
}
349349

350350
}

0 commit comments

Comments
 (0)