This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTabbedPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTabbedPane" Watch "JTabbedPane" New topic
Author

JTabbedPane

pankaj saxena
Ranch Hand

Joined: Nov 21, 2009
Posts: 46
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

Joined: Jan 21, 2009
Posts: 111
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)'


Life is either daring something or nothing - Helen Keller
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTabbedPane