Reputation: 21
I have initialized a decorator into my project, which was at first fine and nice looking. But now I have encountered several problems, I did not figure out how to change the border color (currently it is black). I also want to remove the button which resizes the window.
Here is the code which touches the decorator:
public void start(Stage primaryStage){
JFXDecorator decorator = new JFXDecorator(primaryStage, gridContainer);
decorator.setCustomMaximize(false);
decorator.setText("Window Title");
decorator.setStyle("-fx-background-color: #ffffff; -fx-font-family:'Franklin Gothic Medium'");
Scene scene= new Scene(decorator, 350, 500, Color.BEIGE);
}
Upvotes: 1
Views: 294
Reputation: 21
A couple of minutes later I came up with a simple but adequate solution. I have created a decorator class in my css file.
Here is the code I have added into my css file:
.jfx-decorator{
-fx-decorator-color: white;
}
.jfx-decorator .jfx-decorator-buttons-container{
-fx-background-color: -fx-decorator-color;
}
.jfx-decorator .resize-border{
-fx-border-color: -fx-decorator-color;
-fx-border-width: 0 4 4 4;
}
Upvotes: 1