I need that when I press a button, the button color changes, Im making the interface in scene builder and style it with fx css. I tried:
.botones:hover {
-fx-background-color: red;
}
.botones:pressed {
-fx-background-color: blue;
}
.botones {
-fx-background-color: #262626;
}
The hover works fine, but when i press the button, it turns blue for a second and then changes to its original color and i want it to stay blue.
Maybe i could use a toggle button instead, but im using jfoenix buttons because they have some cool effects.