'Set the color of progressbar
'Parameter: ProgressBar, Color as string
'Examples:
'Private pbMain as ProgressBar
'setProgressBarColor(pbMain, "red")
'setProgressBarColor(pbMain, "green")
Sub setProgressBarColor(pb As ProgressBar, color As String)
Dim joPB As JavaObject = pb
joPB.RunMethodJo("lookup", Array(".bar")).RunMethod("setStyle", Array("-fx-background-color: " & color & ";"))
'Call without parameter: joPB.RunMethodJo("lookup", Array(".bar")).RunMethod("setStyle", Array("-fx-background-color: red;"))
End Sub