I am wondering how I can resize the processing canvas that’s contained in my JavaFX app.
Processing.java:
@Override
public void settings() {
size(0,0,FX2D);
fullScreen();
}
@Override
public void setup() {
surface.setResizable(true);
}
(Not shown is the PSurface initSurface())
For my FXML, I am using a BorderPane and in the center, is a VBox.
BorderPane root = FXMLLoader.load(getClass().getResource("app.fxml"));
VBox pane = (VBox) root.getCenter();
processingCanvas.widthProperty().bind(pane.widthProperty());
processingCanvas.heightProperty().bind(pane.heightProperty());
// Adding the canvas to App
root.getChildren().add(processingCanvas);
And what I get is this:
Is this possible to do in Processing and JavaFX? If not I may have to stick with JavaFX for my project…