#JavaFX Rotating/Binding
1 messages · Page 1 of 1 (latest)
well what is the black and red? are these panes? is the red pane or whatever a children of the black one?
they are rectangles on a pane
they are two different rectangles
i want to they act as one rectangle
what kind of pane are you using? you should ideally use stackpane in this case
and then I would just try to rotate the pane itself
well whatever you are doing, you would group both of them in an pane and then rotate that pane
you might need to wrap it in an additional pane if there are more elements that shouldnt be rotated
i just able to rotating rectangle
but i think grouping will work lemme try
thx
@bleak garnet grouping is worked, but i couldnt find how to move the place of group.
how to move the place of group.
wdym exactly? what is your current ui setup and what are you trying to do?
when i rotated my group of rectangles, it rotates succesfully but it coordinates becomes wrong since it is rotating from center. i want to re-set coordinates.
i tried to apply setScaleX but couldnt
well that is some math logic in your specific code, you might not be able to use javafx's rotate functionality in this case
instead you need to do the math and logic for it yourself
yeah but how to change coordinates idk it
i couldnt find it
well I cant tell you without seeing your specific code 🤷♂️