Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf8f3ed5

Browse files
committed
minor fix for JSframeUI not embedding properly
ensures that the desired frame size is created.
1 parentcbf4dac commitf8f3ed5

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250326134231
1+
20250413104722
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20250326134231
1+
20250413104722
-900 Bytes
Binary file not shown.

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
importjavax.swing.JComponent;
1515
importjavax.swing.JFrame;
1616
importjavax.swing.LookAndFeel;
17+
importjavax.swing.SwingUtilities;
1718
importjavax.swing.Timer;
1819

1920
importswingjs.JSUtil;
@@ -180,9 +181,15 @@ public Object getEmbedded(String type) {
180181
if (dim.width >0) {
181182
frame.setUndecorated(true);
182183
frame.setLocation(0,0);
184+
DOMNode.setStyles(containerNode,"width",dim.width +"px","height",dim.height +"px");
183185
Stringresize =DOMNode.getStyle(node,"resize");
184-
if (resize =="none")
185-
frame.秘freezeBounds(dim.width,dim.height);
186+
if (resize =="none") {
187+
SwingUtilities.invokeLater(()->{
188+
// this allows the freeze to be after the
189+
// currently executing reshape execution
190+
frame.秘freezeBounds(dim.width,dim.height);
191+
});
192+
}
186193
}else {
187194
DOMNode.setStyles(node,"position","relative","overflow","hidden");
188195
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp