Pregunta

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?

¿Fue útil?

Solución

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/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top