This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
Similar Threads
What design pattern i should apply ?
Linking two JPanels with a JButton
Tab control in silverstream pages
confusion on coding standards
Working with tabs in Netscape 6.0