Java examples for JavaFX:Stage
get JavaFX Full Screen Stage
//package com.java2s; import javafx.geometry.Rectangle2D; import javafx.stage.Screen; import javafx.stage.Stage; public class Main { public static Stage getFullScreenStage(String pTitle) { Screen screen = Screen.getPrimary(); Rectangle2D bounds = screen.getVisualBounds(); Stage stage = new Stage(); stage.setTitle(pTitle);/* w ww. j a va 2s .c o m*/ stage.setX(bounds.getMaxX() / 2); stage.setY(bounds.getMinY()); stage.setWidth(bounds.getMaxX()); stage.setHeight(bounds.getMaxY()); return stage; } }