You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Jerome Lelasseux <le...@yahoo.com.INVALID> on 2020/06/24 22:07:13 UTC

How to use the new FlatLaf look & feel in a Netbeans application ?

Hi,
I use NB 11.3 which includes the new FlatLaf dark look & feel. I can use it for the IDE, but how to use it in my Netbeans platform app ?
Jerome

Re: How to use the new FlatLaf look & feel in a Netbeans application ?

Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
 Understood, thanks for the links!

    Le jeudi 25 juin 2020 à 10:08:55 UTC+2, Neil C Smith <ne...@apache.org> a écrit :  
 
 On Thu, 25 Jun 2020 at 00:40, Laszlo Kishalmi <la...@gmail.com> wrote:
> NbPreferences.root().node( "laf" ).put( "laf", "com.formdev.flatlaf.FlatDarkLaf" ); Somewhere really early, probably at an @OnStart marked runnable.

This probably needs to be done in ModuleInstall::validate - @OnStart
is too late to work consistently, unless behaviour has changed
recently.

You can see use of validate() in eg.
https://github.com/Revivius/nb-darcula/blob/master/src/main/java/com/revivius/nb/darcula/Installer.java#L29
and https://github.com/praxis-live/praxis-live/blob/v2.3.3/praxis.live.laf/src/net/neilcsmith/praxis/live/laf/Installer.java#L53

Best wishes,

Neil

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

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

  

Re: How to use the new FlatLaf look & feel in a Netbeans application ?

Posted by Neil C Smith <ne...@apache.org>.
On Thu, 25 Jun 2020 at 00:40, Laszlo Kishalmi <la...@gmail.com> wrote:
> NbPreferences.root().node( "laf" ).put( "laf", "com.formdev.flatlaf.FlatDarkLaf" ); Somewhere really early, probably at an @OnStart marked runnable.

This probably needs to be done in ModuleInstall::validate - @OnStart
is too late to work consistently, unless behaviour has changed
recently.

You can see use of validate() in eg.
https://github.com/Revivius/nb-darcula/blob/master/src/main/java/com/revivius/nb/darcula/Installer.java#L29
and https://github.com/praxis-live/praxis-live/blob/v2.3.3/praxis.live.laf/src/net/neilcsmith/praxis/live/laf/Installer.java#L53

Best wishes,

Neil

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

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


Re: How to use the new FlatLaf look & feel in a Netbeans application ?

Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
 Thanks, it works. 

    Le jeudi 25 juin 2020 à 01:40:03 UTC+2, Laszlo Kishalmi <la...@gmail.com> a écrit :  
 
  
Right now Flatlaf is part of the platform, so it is available for the platform based applications as well.
 
If you would like to use it as default probably the best would be to add the call of:
 
NbPreferences.root().node( "laf" ).put( "laf", "com.formdev.flatlaf.FlatDarkLaf" ); Somewhere really early, probably at an @OnStart marked runnable.
 
 On 6/24/20 3:07 PM, Jerome Lelasseux wrote:
  
 
 Hi, 
  I use NB 11.3 which includes the new FlatLaf dark look & feel. I can use it for the IDE, but how to use it in my Netbeans platform app ? 
  Jerome
     

Re: How to use the new FlatLaf look & feel in a Netbeans application ?

Posted by Laszlo Kishalmi <la...@gmail.com>.
Right now Flatlaf is part of the platform, so it is available for the 
platform based applications as well.

If you would like to use it as default probably the best would be to add 
the call of:

NbPreferences.root().node( "laf" ).put( "laf", 
"com.formdev.flatlaf.FlatDarkLaf" ); Somewhere really early, probably at 
an @OnStart marked runnable.

On 6/24/20 3:07 PM, Jerome Lelasseux wrote:
> Hi,
>
> I use NB 11.3 which includes the new FlatLaf dark look & feel. I can 
> use it for the IDE, but how to use it in my Netbeans platform app ?
>
> Jerome