Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private TabPane1 As TabPane
    Private tb1 As Tab1
End Sub
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    tb1.Initialize(TabPane1) 'example of a class for a specific tab
    For i = 2 To 10
        Dim gt As GenericTab 'more generic class
        gt.Initialize(TabPane1, "Tab " & i)
    Next
End Sub