-
Enhancement
-
Resolution: Duplicate
-
P5
-
None
-
6
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux andromeda.basis.com 2.6.16-1.2108_FC4 #1 Thu May 4 23:52:01 EDT 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
ColorChooser.setEnabled(0) doesn't disable any of the sub components, so it's difficult to prevent the user from interacting with the color chooser.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect the color chooser to prevent me from interacting with the chooser panels.
ACTUAL -
I can interact with the chooser panels to my heart's content.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.lang.reflect.InvocationTargetException;
import javax.swing.JColorChooser;
import javax.swing.JDialog;
import javax.swing.SwingUtilities;
public class DisabledColorChooser
{
public static void main(String[] p_argv) throws InterruptedException, InvocationTargetException
{
final JDialog dialog = new JDialog();
SwingUtilities.invokeAndWait(new Runnable()
{
public void run()
{
JColorChooser cc = new JColorChooser();
dialog.add(cc);
dialog.pack();
dialog.setVisible(true);
cc.setEnabled(false);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Recursively disabling the controls seems like it might work, but there is another issue with that.
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Linux andromeda.basis.com 2.6.16-1.2108_FC4 #1 Thu May 4 23:52:01 EDT 2006 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
ColorChooser.setEnabled(0) doesn't disable any of the sub components, so it's difficult to prevent the user from interacting with the color chooser.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect the color chooser to prevent me from interacting with the chooser panels.
ACTUAL -
I can interact with the chooser panels to my heart's content.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.lang.reflect.InvocationTargetException;
import javax.swing.JColorChooser;
import javax.swing.JDialog;
import javax.swing.SwingUtilities;
public class DisabledColorChooser
{
public static void main(String[] p_argv) throws InterruptedException, InvocationTargetException
{
final JDialog dialog = new JDialog();
SwingUtilities.invokeAndWait(new Runnable()
{
public void run()
{
JColorChooser cc = new JColorChooser();
dialog.add(cc);
dialog.pack();
dialog.setVisible(true);
cc.setEnabled(false);
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Recursively disabling the controls seems like it might work, but there is another issue with that.
- duplicates
-
JDK-4222508 JColorChooser ignores setEnabled() function call
- Closed