Not resizable Window Scene : Scene « JavaFX « Java






Not resizable Window Scene

 


import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class Main extends Application {

  public static void main(String[] args) {
    launch(args);
  }

  @Override
  public void start(Stage primaryStage) {

    BorderPane bp = new BorderPane();
    bp.setPadding(new Insets(10, 50, 50, 50));
    Scene scene = new Scene(bp);
    primaryStage.setScene(scene);
    primaryStage.setResizable(false);
    primaryStage.show();
  }
}

   
  








Related examples in the same category

1.Create Scene from VBox
2.Show a Scene
3.Create and Set size and background color for a Scene
4.Set Scene background color and size
5.Set CSS file to Scene
6.Binding window Scene size to Title