I want to change a specific pane color by using combo box. Whenever I select a color, grey for example, It changes the color of the Pane. I tried this code but it didn't do anything.
**@FXML
private void Select(ActionEvent event) {
String myColor = ColorBox.getValue();
if (myColor.equalsIgnoreCase("blue")){
Pane.setStyle(myColor);
} else if(myColor.equalsIgnoreCase("white")){
Pane.setStyle("fx-background-color: white");
} else if(myColor.equalsIgnoreCase("grey")){
Pane.setStyle("fx-background-color: grey");
}**
}
}