Skip to content
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

Windows with Decorations: Double Titlebar when Re-Opening JFrame Instance #277

Closed
PicoMitchell opened this issue Mar 22, 2021 · 7 comments
Closed
Labels
custom window decorations Related to using FlatLaf custom window decorations
Milestone

Comments

@PicoMitchell
Copy link

I have just updated to FlatLaf 1.1 and have noticed an issue with a loading window that I use. It is a JFrame which gets instantiated once and then is disposed and setVisible multiple times throughout running the app.

The first time this loading windows opens, everything looks fine. But, when this window is disposed and then re-opened, it gets 2 titlebars. One appears to be the undecorated titlebar, and the other is the FlatLaf decorated titlebar.

Screenshot attached. Please let me know if there is any other info or testing you need from me. If it turns out to not be easy to reproduce, maybe there is something else weird I am doing that I can try to investigate further.

Screen Shot 2021-03-22 at 11 39 42 AM

@DevCharly
Copy link
Collaborator

Interesting... will try to reproduce.

Do you use setUndecorated(...) or getRootPane().setWindowDecorationStyle(...) on that window?

@PicoMitchell
Copy link
Author

Is there anyway to disable Decorations for just this window with the new Decorations setup until this bug has been fixed?

@PicoMitchell
Copy link
Author

PicoMitchell commented Mar 22, 2021

Do you use setUndecorated(...) or getRootPane().setWindowDecorationStyle(...) on that window?

Nope, I don't use either of those on this windows.

@DevCharly
Copy link
Collaborator

Is there anyway to disable Decorations for just this window...

No, but this is a good idea 👍

Can reproduce the issue. Working on a fix...

Will release FlatLaf 1.1.1 in a few days.

@PicoMitchell
Copy link
Author

Great, glad it was easy to reproduce! Thanks so much for your super fast response on this!

DevCharly added a commit that referenced this issue Mar 23, 2021
…isposing a window and then showing it again (issue #277)
@DevCharly
Copy link
Collaborator

Great, glad it was easy to reproduce!

Yes, it was easy 😉

window.dispose();
window.setVisible( true );

Fixed in main branch.

Please try the latest 1.2-SNAPSHOT and let me know whether it now works:
https://github.com/JFormDesigner/FlatLaf#snapshots

@DevCharly DevCharly added this to the 1.1.1 milestone Mar 23, 2021
DevCharly added a commit that referenced this issue Mar 23, 2021
@PicoMitchell
Copy link
Author

Please try the latest 1.2-SNAPSHOT and let me know whether it now works:
https://github.com/JFormDesigner/FlatLaf#snapshots

All appears to be working correctly and looking great with Decorated titlebars in Windows with the latest Snapshot (flatlaf-1.2-20210323.141150-4.jar).

Thank you!

@DevCharly DevCharly added the custom window decorations Related to using FlatLaf custom window decorations label Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom window decorations Related to using FlatLaf custom window decorations
Projects
None yet
Development

No branches or pull requests

2 participants