Resize Processing canvas in JavaFX window

I am wondering how I can resize the processing canvas that’s contained in my JavaFX app.

    public void settings() {

    public void setup() {

(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();


        // Adding the canvas to App

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…

1 Like

From your screenshot – what is happening? Are you able to drag the window frame out it reveals the white area, but the gray Processing sketch area stays the same size?

Yes, I dragged the window out and the rest is white, the javafx window. Sorry the screenshot is hard to tell. The processing window does stay the same.

Try taking a look at this one :