An undecorated JavaFX scene with move, resize, minimize, maximize, close, and Aero Snap/Quarter Tiling.
BorderlessSceneFX is a JavaFX scene that allows you to create a borderless window with move,
resize, minimize, maximize, close, and Aero Snap/Quarter Tiling.
Both the scene and the aero snap window are customizable.
- Move
- Resize
- Minimize
- Maximize
- Close
- Aero Snap/Quarter Tiling
- Styling Aero Snap window
- Styling Main window
- Extensive API
- Customizable
This project has been forked and further developed from this GitHub repository.
Add BorderlessSceneFX to your dependencies
dependencies {
implementation 'com.catwithawand:borderlessscenefx:1.0.0'
}
<dependency>
<groupId>com.catwithawand</groupId>
<artifactId>BorderlessSceneFX</artifactId>
<version>1.0.0</version>
</dependency>
@Override
public void start(Stage primaryStage) throws Exception {
// Our root node
BorderPane root = new BorderPane();
// Our top bar
HBox topBar = new Hbox();
topBar.setMinHeight(50);
topBar.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
topBar.setStyle("-fx-background-color:#303030;");
topBar.setAlignment(Pos.CENTER_RIGHT);
borderPane.setTop(topBar);
// A close button
Button closeButton = new Button("x");
closeButton.setOnAction(event -> primaryStage.close());
// Create the BorderlessScene scene
BorderlessScene scene = new BorderlessScene(primaryStage, StageStyle.TRANSPARENT, root, Color.TRANSPARENT);
// Make the top bar draggable, so we can move the stage
scene.setMoveControl(topBar);
// Set the scene to our stage
primaryStage.setScene(scene);
primaryStage.setTitle("BorderlessSceneFX");
// Finally show the stage
primaryStage.show();
}
For an actual implementation see the BorderlessSceneFX demo application.