I have a seemingly straightforward question that has been puzzling me. I am looking to define multiple circles in my FXML file; 10 of these circles should have a radius of 10px, while 20 others should have a radius of 6px. I want to establish the size at one central location for easy modification.
After exploring various options, I have not been able to determine if it's possible to declare a variable directly in FXML, which would be the simplest solution. Alternatively, I attempted to utilize CSS to address this issue by assigning two different style classes to the circles and setting the size parameters in a CSS file. Unfortunately, I discovered that there is no property for scaling circles available.
<Circle fx:id="c00" centerX="100" centerY="100" styleClass="circle10" />
Another idea I considered was extending the Circle class and manually adjusting the radius as needed. However, I prefer not to manipulate Java code for layout purposes, as I believe that design elements should ideally be handled within FXML and CSS files.
I am certain that there must be a way to achieve this without delving into Java coding. Any assistance on this matter would be greatly appreciated!