0

Hello

I just started working with JTabbedPane tabs.
I have been using the index to navigate the pane. Now I add and remove tabs
from the pane so clearly the index navigation is no good.
Does anyone know some code for an easy solution for using the title or something so
a menu can navigate the pane again?

1
Contributor
1
Reply
3
Views
6 Years
Discussion Span
Last Post by ceyesuma
0

Hello

I just started working with JTabbedPane tabs.
I have been using the index to navigate the pane. Now I add and remove tabs
from the pane so clearly the index navigation is no good.
Does anyone know some code for an easy solution for using the title or something so
a menu can navigate the pane again?

--------------------------------------------------------------------------------
I found this I guess I'll give-er a try and see what happens

indexOfTab
public int indexOfTab(Icon icon)Returns the first tab index with a given icon, or -1 if no tab has this icon.

Parameters:
icon - the icon for the tab
Returns:
the first tab index which matches icon, or -1 if no tab has this icon

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.