Sub CreateToolBar
Dim joToolBar As JavaObject
Dim B1 As Button:B1.Initialize("B1"):B1.Text="Button 1":B1.TextColor=fx.Colors.Red
Dim B2 As Button:B2.Initialize("B2"):B2.Text="Button 2":B2.TextColor=fx.Colors.Blue
joToolBar.InitializeNewInstance("javafx.scene.control.ToolBar", Null)
joToolBar.RunMethodJO("getItems", Null).runMethod("add", Array(B1))
joToolBar.RunMethodJO("getItems", Null).runMethod("add", Array(B2))
joToolBar.RunMethod("setStyle", Array("-fx-background-color: yellow;"))
MainForm.RootPane.AddNode(joToolBar, 10, 10, 300, 50)
End Sub
Sub B1_Action
Log("Button1 clicked")
End Sub
Sub B2_Action
Log("Button2 clicked")
End Sub