• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tabbed Pane display issue  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added four tabs to my program, but I am having issues getting them to display correctly. For the sake of keeping this simple, just assume i call them tabs 1,2,3,4. The problem is when i start the program, Tab 4 displays first and i have to select all 4 of them ( 1 through 4) before it starts working correctly.

Now i am assuming that since tab 4 was added last in the code, that is why i am getting it first. Any idea what i should be looking for to get it to display correctly?

I know this is vague, but i am afraid of the sheer amount of code i would have to paste here to show you were my problem is at.

Thanks!
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The Java documentation has a whole tutorial for JTabbedPanes (which is presumably what you're using - you don't say), here.

That will tell you how you can programatically set the tab that should be selected.

I don't understand what you mean by:
i have to select all 4 of them ( 1 through 4) before it starts working correctly


In what way do they not work correctly? If you can select them, surely that means they are working? No?

Dave.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!