• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTabbedPane

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic