• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

JTabbedPane

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic