JavaFX Scene Builder: How to uncheck "Resize" option in Layout tab?
javafx, javafx-2, scenebuilder
Solution
For resize functionality,you need to have stage of main class. initial stage reference will use it for make it non -resizable.
Try this.
MainClass.java
public class MainClass extends Application {
public static Stage stage;
@Override
public void start(Stage stage) throws Exception {
this.stage = stage; // initialize value of stage.
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
SampleController
MainClass.stage.setResizable(false);
Problem
I want to make my .fxml application to not be resizeable, but I am not able to uncheck "Resizeable" check box on any anchorPanes, the option is greyed out. The same thing happens even on a new, completely empty project. ``` Product Version JavaFX Scene Builder 1.1 Build Information Version: 1.1-b35, Changeset: 50e3d7cdf394 Date: 2013-08-27 10:45 ```