[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using setEnabled on GUI components inside a JTabbedPane

Posted on 2009-04-06
3
Medium Priority
?
464 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
ID: 24083998
Try .setVisible(false);

;JOOP!
0
 

Author Comment

by:namsu55
ID: 24084114
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 1500 total points
ID: 24084922
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

872 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