Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTabbedPane keeps track of last selected tab

807589Jun 23 2008 — edited Jun 24 2008
Hi everybody,
experiencing some problems with swing...
I've got a javax.swing.JTabbedPane whose behaviour is kind of strange: I need my application to have always the same tab selected at initialisation, which is very simple in theory. In my initialisation method I just do:
MainTab.setSelectedIndex(0);

But instead of selecting the first tab (index 0), it keeps selected the one I last chose in the previous run.

Any idea?
Thanks in advance.

JON HAITZ
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2008
Added on Jun 23 2008
13 comments
278 views