Iterate Through Tab Components in JTabbedPane

I need to determine which tabs in JTabbedPane need to be updated by defining the contents of each tab component. From what I can determine, there is no way to iterate over each tab using the default JTabbedPane model.

Does anyone have any ideas on what I can do in this situation?

+5
source share
3 answers

if you use something like:

int totalTabs = tabbedPane.getTabCount();
for(int i = 0; i < totalTabs; i++)
{
   Component c = tabbedPane.getTabComponentAt(i);
   //other stuff
}

May give you a starting point to do what you want.

+14
source

getComponentAt(int index)

0

All Articles