-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatMenuUI: remove JMenuBar dependency #794
FlatMenuUI: remove JMenuBar dependency #794
Conversation
Merge from JFormDesigner/FlatLaf:master
…andMenuBar in JIDE OSS
Thanks for the PR. I wonder in which situation the
|
@DevCharly I've updated the original PR description with a sample screenshot that uses this PR branch. |
Thx. Finally I understand why Instead of merging this PR, I've cherry picked your commit 4d4b90c. This PR contains a lot of "Merge remote-tracking branch 'origin/master'" commits, For future PRs, please base them on main branch of this repo. To update dbvis/FlatLaf repo, it would be better to avoid merging from this repo. |
@DevCharly Super! Yeah, sorry the PR did include a lot of commits. Will be more careful in the future. |
A ClassCastException is thrown in
FlatMenuUI.java
when using aCommandMenuBar.java
in JIDE. This occurs sinceFlatMenuUI
assumes there is always aJMenuBar
as parent for aJMenuItem
. The problem occurs if resizing the width of the window whereas JIDE automatically replacesJMenu
's that doesn't fit with a clickable icon. Clicking it shows a popup window with the menus that doesn't fit to display. The owner of theJMenuItem
's is then aCommandBarPane
instance rather than the originalCommandMenuBar
. The CCE happens when clicking the icon.This PR generalizes
FlatMenuUI
to not require aJMenuBar
.With this change it now works fine with JIDE.