Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private TabPane1 As TabPane
Private xui As XUI
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
Dim richtext As B4JTextFlow
richtext.Initialize
CreateTab("2", richtext.Reset.Append("Red").SetColor(xui.Color_Red).CreateTextFlow)
CreateTab("2", richtext.Reset.Append("Green").SetColor(0xFF006204).CreateTextFlow)
CreateTab("2", richtext.Reset.Append("Blue").SetColor(xui.Color_Blue).CreateTextFlow)
End Sub
Sub CreateTab (LayoutFile As String, TextFlow As Pane)
Dim t As TabPage = TabPane1.LoadLayout(LayoutFile, "")
Dim jo As JavaObject = t
jo.RunMethod("setGraphic", Array(TextFlow))
End Sub