I am not sure I add this L&F right, but it just works. Below are the steps
- Download flatlaf-intellij-themes-2.0-rc1.jar and flatlaf-2.0-rc1.jar from https://www.formdev.com/flatlaf/themes/ . If you has any project used it by maven, just copy it from your .m2 folder
- Put those jars in C:\Program Files\NetBeans-12.5\netbeans\platform\lib
- Edit netbeans.conf , add below to netbeans_default_options
--laf com.formdev.flatlaf.intellijthemes.FlatArcOrangeIJTheme
Below is the code to use FlatArcOrangeIJTheme in your swing app
try {
UIManager.setLookAndFeel(new FlatArcOrangeIJTheme());
} catch (Exception ex) {
System.err.println("Failed to initialize LaF");
}
I am thinking to create a NetBeans plugin to let users switch themes, but the above code has to be run before any swing component is unitized. I tried to run these code in NetBeans action, but the whole NetBeans crash.
![](https://peter.quantr.hk/wp-content/uploads/2022/01/Screenshot_1-600x339.png)
To use dark theme, add “–laf com.formdev.flatlaf.intellijthemes.FlatArcDarkOrangeIJTheme” and set the profile to dark
![](https://peter.quantr.hk/wp-content/uploads/2022/05/Screenshot_3-1-600x320.png)
![](https://peter.quantr.hk/wp-content/uploads/2022/05/Screenshot_4-600x450.png)
below is “–laf com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme”
![](https://peter.quantr.hk/wp-content/uploads/2022/05/Screenshot_5-600x320.png)
To scale it :
-J-Dsun.java2d.uiScale=2.5 --fontsize 18