This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTabbedPane

 
pankaj saxena
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 3 tabs in one frame:
1. write
2. changes
3. add

Question:
How would i make other tabs inaccessible, when the user is working on one tab (lets say, write tab), so that during the process, if that user clicks on another tabs, he wouldn't be allowed?


 
Bharath Raja
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pankaj saxena wrote:I have 3 tabs in one frame:
when the user is working on one tab (lets say, write tab), so that during the process, if that user clicks on another tabs, he wouldn't be allowed?


get the index of tabs(your changes tab and add tab) and you can disable that tabs using 'setEnabledAt(int index,boolean false/true)'
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of your duplicate threads on this subject have been sent to oblivion.

As for your question, if you're thinking about having tabbed panes with non-functional tabs, perhaps you don't want tabbed panes at all. Maybe CardLayout would be better.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic