Search code examples
csscheckboxjavafxrotationgridpane

Rotating a GridPane in javaFX using CSS


I'm having a lil' problem. I am asked to make a game, so now I got the layout, I yet have to make sure that when a CheckBox called 'roteer'; is active, I need to rotate the entire GridPane in which the game is made 180 degrees. For example, I have a square and I want that square to turn everytime I press a button, but only when a checkbox is checked. How do I do this? If you have no idea about the CheckBox, how can I rotate a square?

Thanks in advance :)


Solution

  • Thanks to eckig.

    RotateTransition worked fine here, thanks a lot!