wood burning stoves 2.0*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTabbedPane" Watch "JTabbedPane" New topic
Author

JTabbedPane

kate damond
Ranch Hand

Joined: Apr 17, 2001
Posts: 77
Hi,
I have a JTabbed Pane with four tabs on it. The first three are quite straightforward, but the fourth one should be disabled at first, then be enabled when some event happens.
So, I initially set a property 'Enabled' fo false : this did nothing. Then I found a property called 'TabEnabled' which, when I set it to false, disables the tab. Great ! So, now, on actionperformed of som button or other, I want to set the TabEnabled property to true again. Alas, I can get at the relevant tab, and I can get at a setEnabled() method but nothing to do with TabEnabled.
So, sticking with just Enabled property and the setEnabled() method, I can't find any evidence of it doing anything ! The Tab is always available.
Any ideas ?
Kate
p.s I don't know why I've started appearing as a 'Ranch Hand' ... seems to imply that I know something - but I know nothing !
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Kate,
First off, you have become a ranch hand because you have posted more than 30 posts. Congrats!
Second you should look at the JTabbedPane method setEnabledAt. The code below uses it in conjunction with the buttons above the TabbedPane.

Enjoy,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTabbedPane