mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.13k stars 234 forks source link

Problems with double windows title bar #627

Closed UltraBurstXD closed 4 years ago

UltraBurstXD commented 4 years ago

Hi Mgarin,

I'm facing double windows title bar issues when my class inherits the l&f super class, WebFrame(). That only happens when I try to decorate the windows title bar frame. I don't know what I did wrong.

Screenshot from 2020-05-18 19-01-03

Here is the simple code:

Screenshot from 2020-05-18 19-03-44

Is WebFrame() class an internal frame?

mgarin commented 4 years ago

You need to provide StyleId before your frame's native peer is initialized (calling setVisible() or pack() forces window to initialize it's native peer) because once it is initialized - you cannot switch between native and custom window decoration and you will be stuck with whichever you had enabled.

The best and most optimal way - provide the StyleId straight into constructor.

UltraBurstXD commented 4 years ago

Thanks, it works!