Is there a way to have the Nimbus Look&Feel render its own windows decorations for a top level JFrame?
Asked Answered
P

1

2

Is there a way to have the Nimbus Look&Feel render its own windows decorations for a top level JFrame? I've been digging through the Internet, and I'm starting to suspect it might not be possible at all. Has anyone actually succeeded with (and cared about) that?

Nimbus decorations are nice and neat for internal frames, but apparently there is no way to have the same effect on JFrames and JDialogs.

I tried nimbusx (Nimbus Extensions), a library that subclasses JFrame and JDialog and allegedly applies nimbus-styled decorations to them (then you just have to instantiate nimbusx classes instead of JFrame and JDialog); but it actually doesn't work, and it's been in an inactive alpha stage since 2009.

So, did anyone succeeded in having their nimbus-styled Java application look consistent on all platforms by having the Nimbus LAF take care of window decorations?

Ph answered 25/1, 2012 at 11:55 Comment(8)
From this bug it seems like Nimbus LAF can't take care of all window decorations yet: bugs.sun.com/bugdatabase/…Royden
It seems the Nimbus PLAF is both buggy and neglected. :(Gammon
@Royden Indeed :( What I'm hoping for is that somebody has managed to find some dirty hack to work around this...Ph
You might also use another look and feel. There are plenty good ones out there, e.g. Substance LAF.Royden
@AndrewThompson Way too much neglected for such a nice Look And Feel... The RFE on Sun/Oracle's bug database is there (in an "Accepted" state) since early 2008...Ph
@Royden Unfortunately the Substance LAF is not actively mantained anymore... Some guy did branch it into a new project called Insubstantial, but they both have the same few window maximization bugs on some platforms: #1 maximized windows cover auto-hide taskbars preventing you to access them, #2 issues with multiple screens and/or high resolutions (failing to detect the right size to maximize to on a big monitor)Ph
@Unai Vivi in Substance I never saw that, nor bugs 1) fixed in Java5, 2) fixed in Java5, 3) I using both in Java Swing with older Substance L&F, 4) last two weeks tested with neewest SwingX and older Substance L&FCoprophilous
@Catalina Island please see my post hereCoprophilous
N
0

I've done this with JGoodies Looks in the past. I don't know if Nimbus supports it or not.

It's not only the LAF, however, it is an option you must programmatically turn on for JFrame (and JDialog if you want).

JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );

See the API Docs

Nestling answered 12/3, 2012 at 18:46 Comment(1)
Nope, that doesn't work for Nimbus because it doesn't render its own top-level window decorations (its delegated to the O.S.)...Ph

© 2022 - 2024 — McMap. All rights reserved.