Question

I am using a basic Stage and Scene which only contains a Circle. Now even if I use an AnchorPane as scene it doesn't resize the Circle and if I use FXML the checkbox for resizability in the circle's properties is disabled. Can anyone help as to how i can react to the resizing of the window/stage, in a way that the circle resizes?

Was it helpful?

Solution

A circle is a a Shape and is not resizeable by default. You can simply bind the width/height of the circle to the width / height of the Scene. Use the properties and property binding. Here is a description of the API: http://www.guigarage.com/2013/01/custom-ui-controls-with-javafx-part3/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top