document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import javafx.application.Application;
  2. import javafx.scene.Scene;
  3. import javafx.scene.layout.StackPane;
  4. import javafx.scene.paint.Color;
  5. import javafx.scene.text.Font;
  6. import javafx.scene.text.FontWeight;
  7. import javafx.scene.text.Text;
  8. import javafx.stage.Stage;
  9.  
  10. /**
  11.  *
  12.  * @web http://zoranpavlovic.blogspot.com/
  13.  */
  14. public class FullScreenScene extends Application {
  15.  
  16.     /**
  17.      * @param args
  18.      *            the command line arguments
  19.      */
  20.     public static void main(String[] args) {
  21.         launch(args);
  22.     }
  23.  
  24.     @Override
  25.     public void start(Stage primaryStage) {
  26.         primaryStage.setTitle("TilePane");
  27.  
  28.         // Adding StackPane
  29.         StackPane sp = new StackPane();
  30.         Text txt = new Text("This is a full screen JavaFX 2 Scene...");
  31.         txt.setFont(Font.font(null, FontWeight.BOLD, 72));
  32.         txt.setFill(Color.RED);
  33.         sp.getChildren().add(txt);
  34.  
  35.         // Adding StackPane to the Scene
  36.         Scene scene = new Scene(sp);
  37.         primaryStage.setScene(scene);
  38.         // Set full screen
  39.         primaryStage.setFullScreen(true);
  40.         primaryStage.show();
  41.     }
  42. }
');