Solved

Using setEnabled on GUI components inside a JTabbedPane

Posted on 2009-04-06
3
434 Views
Last Modified: 2013-12-14
I am using setEnabled(false) on the tabbed pane. When a certain condition is met, the setEnabled becomes true. I have panels inside the tabbed pane which I would like to disable until a condition is met. I have tried setEnabled(false) on them from various places and the constructor itself however no success.
0
Comment
Question by:namsu55
  • 2
3 Comments
 
LVL 24

Expert Comment

by:sciuriware
Comment Utility
Try .setVisible(false);

;JOOP!
0
 

Author Comment

by:namsu55
Comment Utility
That removes the whole panel from the GUI, I want is visible but disabled for use (Greyed).
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 500 total points
Comment Utility
I think that is not possible with this kind of components.
What you can do is swap the component with a label or such with the same size
and a grey background.
This swapping can be done by setting one visible and the other one to invisible.

;JOOP!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now