Skip to content
Advertisement

AnchorPane shows a white border when setResizable is false (JavaFX)

My problem is that when I use setResizable(false) one white border is shown on my scene. When I don’t set it false works fine, but I need to set it false.

Code:

JavaScript

My ImageView is inside of my AnchorPane

JavaScript

enter image description here

Advertisement

Answer

I had the same issue, I resolved in this way:

JavaScript

You have to set the scene before setting the resizable property and set the width/height manually. This has solved my problem.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement