Public Sub InsertPage (tabstrip As TabStrip, Index As Int, Page As Panel, Title As String)
Dim jo As JavaObject = tabstrip
jo.GetFieldJO("pages").RunMethod("add", Array(Index, Page))
jo.GetFieldJO("titles").RunMethod("add", Array(Index, Title))
RefreshTabStrip(tabstrip)
End Sub
Public Sub RemovePage (tabstrip As TabStrip, Index As Int) As Panel
If tabstrip.CurrentPage >= Index Then tabstrip.ScrollTo(0, False)
Dim jo As JavaObject = tabstrip
Dim p As Panel = jo.GetFieldJO("pages").RunMethod("remove", Array(Index))
jo.GetFieldJO("titles").RunMethod("remove", Array(Index))
RefreshTabStrip (tabstrip)
Return p
End Sub