JFormDesigner / FlatLaf

FlatLaf - Swing Look and Feel (with Darcula/IntelliJ themes support)
https://www.formdev.com/flatlaf/
Apache License 2.0
3.42k stars 272 forks source link

Disabled buttons background #542

Closed Ejdzyn closed 2 years ago

Ejdzyn commented 2 years ago

Hi, I want to change background color of disabled button but its always static color, white by default.

Tried to remove Button.disabledBackground from UIManager but didnt work.

I want some disabled buttons to have orange background and some to have red color f.e. It can be changed without look and feel

DevCharly commented 2 years ago

Use styling:

button.putClientProperty( "FlatLaf.style", "disabledBackground: #ff0000" );
Ejdzyn commented 2 years ago

Wow it works

Thanks a lot!