Neil, thank you, that is much better! For some reason, I didn't realize that 
just setting the LAF in NbPreferences is all that was required.
As for filtering, in validate() I just call 
UIManager.setInstalledLookAndFeels(flatLafs) where UIManager.LookAndFeelInfo[] 
flatLafs contains just the 2 FlatLafs from 
UIManager.getInstalledLookAndFeels(). It works, it just shows the 2 LAFs in 
Tools-Options-Appearance.

    On Wednesday, August 31, 2022 at 04:42:42 PM GMT+3, Neil C Smith 
<neilcsm...@apache.org> wrote:  
 
 On Wed, 31 Aug 2022 at 14:28, Mike Hallan <mkhal...@yahoo.com> wrote:
>  I found that Installer's validate() may not return the correct LAF that will 
>actually be used.

No, it won't.  It'll run before NetBeans sets up the look and feel.
Which is actually what you want.

I suggested you look at filtering the installed look and feels, and
correcting the value of NbPreferences laf property in a validate().
This needs to run in a module that depends on FlatLaf.

> then UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf") ...
>
> As I said, it seems to work although it doesn't feel ideal.

No, it isn't ideal - you can get weird artefacts by calling
UIManager::setLookAndFeel.  Better to let NetBeans look and feel setup
handle this for you.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

  

Reply via email to