Yoana Yoana - 18 days ago 10
Java Question

How can I draw a hexagon in Java Scene Builder 2.0?

I want to create a custom shape in Java Scene Builder - hexagon. I tried using the "Polygon" option but the only thing I get, is a triangle.
Does anyone know how can I edit this? I read somewhere that I should set the shape to "resizeable" but the option in Java Scene Builder is inactive...

I would really appreciate any help!

Answer

I figured it out:

 <Polygon fill="DODGERBLUE" layoutX="108.0" layoutY="121.0" stroke="BLACK" strokeType="INSIDE">
 <points>

<Double fx:value="-50.0" />
<Double fx:value="30.0" />

<Double fx:value="0.0" />
<Double fx:value="60.0" />

<Double fx:value="50.0" />
<Double fx:value="30.0" />

<Double fx:value="50.0" />
<Double fx:value="-30.0" />

<Double fx:value="0.0" />
<Double fx:value="-60.0" />

<Double fx:value="-50.0" />
<Double fx:value="-30.0" />



 </points>
</Polygon>