Using setEnabled on GUI components inside a JTabbedPane

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.
Who is Participating?
sciuriwareConnect With a Mentor Commented:
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.

Try .setVisible(false);

namsu55Author Commented:
That removes the whole panel from the GUI, I want is visible but disabled for use (Greyed).
All Courses

From novice to tech pro — start learning today.