Skip to content

Conversation

@ptziegler
Copy link
Contributor

See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4982522

The problem is that Swing components (or any lightweight) will not
receive mouse events, if they are added directly to the Windows
embedded frame (WEmbeddedFrame). This problem only happens on Windows,
and it is possible to work around it by adding a java.awt.Panel
between them.

The original solution was to choose a JApplet. But as the bug says, a JPanel can be used instead.

@ptziegler ptziegler added this to the 1.22.0 milestone Sep 12, 2025
@ptziegler ptziegler force-pushed the swing-deprecated-japplet branch 4 times, most recently from 3d74a11 to 85927c5 Compare September 12, 2025 22:24
@ptziegler ptziegler force-pushed the swing-deprecated-japplet branch from 85927c5 to 3909c14 Compare September 12, 2025 22:32
@ptziegler ptziegler changed the title Replace deprecated JApplet with JPanel. Replace deprecated JApplet with JRootPane. Sep 12, 2025
See https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4982522

> The problem is that Swing components (or any lightweight) will not
> receive mouse events, if they are added directly to the Windows
> embedded frame (WEmbeddedFrame). This problem only happens on Windows,
> and it is possible to work around it by adding a java.awt.Panel
> between them.

The original solution was to choose a JApplet. But as the bug says, a
JPanel can be sufficient. However, to avoid any issues when calling
getRootPane() on the component, a JRootPane is used.
@ptziegler ptziegler force-pushed the swing-deprecated-japplet branch from 3909c14 to a0f5530 Compare September 13, 2025 09:39
@github-actions
Copy link

Test Results

 2 720 files   2 720 suites   9h 15m 13s ⏱️
 6 985 tests  6 915 ✅  70 💤 0 ❌
27 940 runs  27 660 ✅ 280 💤 0 ❌

Results for commit a0f5530.

@ptziegler ptziegler merged commit d12a13f into eclipse-windowbuilder:master Sep 13, 2025
9 checks passed
@ptziegler ptziegler deleted the swing-deprecated-japplet branch September 13, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant