Thanks! I ended up using Neil's approach for setting the default LAF with the 
bundle, adding LookAndFeelClassName=com.formdev.flatlaf.FlatLightLaf  to the 
branding bundle and adding the following to my NetBeans Platform application 
pom.xml file:

    <dependency>
      <groupId>org.netbeans.modules</groupId>
      <artifactId>org-netbeans-swing-laf-flatlaf</artifactId>
      <version>${netbeans.version}</version>
      <scope>runtime</scope>
    </dependency>

This still lets the user modify the LAF later through the Tools-->Options 
dialog, which is what I wanted in my case.

-- Eirik

-----Original Message-----
From: Neil C Smith <neilcsm...@apache.org> 
Sent: Monday, April 11, 2022 5:32 AM
To: Amith, Muhammad F <muhammad.f.am...@uth.tmc.edu>; users@netbeans.apache.org
Subject: Re: [RCP] Setting Window Dimensions and LAF

On Fri, 8 Apr 2022 at 19:28, Amith, Muhammad F <muhammad.f.am...@uth.tmc.edu> 
wrote:
> 2. How do I set the look and feel of the RCP to one of the new Flat LAF?

I'd suggest doing what the IDE itself does, which uses branding but not the laf 
property.  It's much simpler.  See the PR that added this to the IDE, and my 
own use of this in an RCP application.

https://github.com/apache/netbeans/pull/3332
https://github.com/praxis-live/praxis-live/blob/master/branding/modules/org-netbeans-swing-plaf.jar/org/netbeans/swing/plaf/Bundle.properties

One thing to be aware of, whichever method you use, is that you need a 
dependency on org.netbeans.swing.laf.flatlaf in one of your modules to force 
the customs to load.  It's a bug IMO that that module is set to autoload.

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