java fxml add css code example
Example 1: add css to javafx fxml
.root {
-fx-background-color:lightgray;
}
Example 2: add css to javafx fxml
package application.view;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
public class RootLayoutController {
@FXML
Button sunButton;
@FXML
public void handleSunButtonClick() {
System.out.println( "Button clicked");
}
}