-
CSR
-
Resolution: Approved
-
P4
-
behavioral
-
low
-
-
Java API
-
SE
Summary
The Swing JFileChooser component now honors the enabled property.
Problem
Swing provides a method JComponent.setEnabled(boolean) which is supposed to be honored by all sub-classes. The effect of "false" should be that the component does not respond to user input. Directly disabling a JFileChooser like this was not possible as the property was not honored or propagated to its sub-components.
Solution
Override the setEnabled(boolean) method from JComponent. This allows it to recursively disable all sub-components and also intercept any action listeners. There is no new javadoc, since the behaviour is now as specified by the superclass.
Specification
public class javax.swing.JFileChooser :
/**
* {@inheritDoc}
* @param enabled {@inheritDoc}
*/
@Override
public void setEnabled(boolean enabled);
- csr of
-
JDK-4365952 Cannot disable JFileChooser
-
- Resolved
-