I have integrated the flatlaf look and feel library into my Swing application via Maven, specifically utilizing version 1.6.2 of FlatLaf.
Within my application, I've employed the existing theme named "flatlaflight.setup()". However, prior to this step, I introduced a properties file bearing the same name into the resources directory. This file was utilized to tailor the style parameters according to my requirements. Regrettably, the system is unable to retrieve the customizations specified within this properties file.
Registered the custom default source to FlatLightLaf.registerCustomDefaultsSource("src/main/resources"); also tried FlatLightLaf.registerCustomDefaultsSource("resources");
To use a FlatLaf properties file in a Maven project:
FlatLightLaf.properties
for class FlatLightLaf
or FlatDarkLaf.properties
for class FlatDarkLaf
.resources/themes
folder (relative path: src/main/resources/themes
).FlatLaf.registerCustomDefaultsSource("themes"); // look for properties file in themes folder
// setup theme later
Note: A section of the documentation places the properties file in com/myapp/themes/MyDarkerLaf.properties
which I don't recommend for a Maven project because your properties will be deleted when you generate a jar file for your program.
https://www.formdev.com/flatlaf/how-to-customize/#application_properties