0

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");

Kumar
  • 1
  • 3
  • Don't use `src/main` or `src/main/resources` or `resources`, these paths won't exist at runtime. First, I would recommend, creating a directory under resources (name it what ever you like), place your properties file in it and then use that directory name instead, for example `FlatLightLaf.registerCustomDefaultsSource("setup");`, where `setup` is the name of directory. If you have subdirectories, then you need to use `.` to seperate them, for example `path.to.your.properties.file` – MadProgrammer Aug 30 '23 at 02:15
  • The contents of the `resources` directory will be copied into your resulting application bundle (excluding the `resources` directory name itself), so a resource named `src/main/resources/image.png`, will appear to your application as `/image.png` and can accessed by using `Class#getResource` or variants. This is standard maven practice and I would suggest spending some time to understand it – MadProgrammer Aug 30 '23 at 02:19

0 Answers0