I am using FlatLaf L&F for my Java Swing project and I am wondering how can I change the accent color of components. For example, I know that I can make buttons round using the code below:
button.putClientProperty( "JButton.buttonType", "roundRect" );
But I do not know how to change the accent color (by default it is blue). I was using the FlatLaf theme editor in Eclipse but now I am working in NetBeans and that theme editor does not work for some reason. You can see the picture below. I want to change the blue color to green. Thank you!
CodePudding user response:
You can change accent color using this code:
FlatLaf.setGlobalExtraDefaults( Collections.singletonMap( "@accentColor", "#f00" ) );
FlatIntelliJLaf.setup();