Posts

Image
 JavaFX Checkbox Styling using CSS /* Checkbox */ .check-box { -fx-text-fill: # 65686 e; -fx-font-weight: normal; -fx-font-size: 14 px; -fx-cursor: hand; -fx-opacity: 0.95 ; } .check-box:hover { -fx-text-fill: # 505257 ; -fx-cursor: hand; -fx-opacity: 1.0 ; } .check-box .box { -fx-background-color: transparent; -fx-border-color: # 65686 e; -fx-border-radius: 4 ; } .check-box:selected .mark { -fx-background-color: white; } .check-box:selected .box { -fx-background-color: # 1 D5EFE; }

How to add borders to HBox using CSS - JAVAFX

Image
Here is the code sample  // Source Code HBox hbox = new HBox(16);  // argument 16 is spacing between children components of this HBox hbox .setStyle("-fx-background-color: grey;" +           "-fx-border-width: 0 0 1 0;" +           "-fx-border-color: #bdbdbd;" +           "-fx-border-radius: 10;"); // Output