### Rotate Node

This is an example of rotating a node on the canvas.
A slider with value 0 to 360 rotates a label.
The rotating is done by using a JavaObject which gets a node assigned and then calls API Method setRotate.
Reference: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html
Reference: https://docs.oracle.com/javafx/2/api/javafx/scene/Node.html
Other examples for use are creating own progressindicator.
B4J Code
`Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private sliderRotate As Slider
Private lblRotatingLabel As Label
End Sub`
`Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Title = "B4J HowTo Rotate a Node"
MainForm.RootPane.LoadLayout("Main")
MainForm.SetFormStyle("UTILITY")
MainForm.RootPane.Style = "-fx-background-color:white"
MainForm.Show
End Sub`
`Sub RotateNode(n As Node, Degree As Double)
Dim jo As JavaObject = n
jo.RunMethod("setRotate", Array(Degree))
End Sub`
`Sub sliderRotate_ValueChange (Value As Double)
RotateNode(lblRotatingLabel, Value)
End Sub`
Layout Nodes
Slider sliderRotate
Label lblRotatingLabel

Changed: , Category: Nodes, File: T6C225M1669.htm, ID: 1669