import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;
/**
*
* @web http://zoranpavlovic.blogspot.com/
*/
public class FullScreenScene extends Application {
/**
* @param args
* the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("TilePane");
// Adding StackPane
StackPane sp = new StackPane();
Text txt = new Text("This is a full screen JavaFX 2 Scene...");
txt.setFont(Font.font(null, FontWeight.BOLD, 72));
txt.setFill(Color.RED);
sp.getChildren().add(txt);
// Adding StackPane to the Scene
Scene scene = new Scene(sp);
primaryStage.setScene(scene);
// Set full screen
primaryStage.setFullScreen(true);
primaryStage.show();
}
}