-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 20, 21
-
None
-
b06
-
os_x
FileChooserUI.getDefaultButton returns non-null value for every Look and Feel but Aqua.
The default implementation in javax.swing.plaf.FileChooserUI#getDefaultButton returns null. It's overridden in BasicFileChooserUI to return getApproveButton which, in its turn, returns the Approve button in each Look and Feel.
AquaFileChooserUI does not extend BasicFileChooserUI, therefore the returned value remains null.
---------- BEGIN SOURCE ----------
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;
public class FileChooserDefaultButton {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> {
JFileChooser fc = new JFileChooser();
System.out.println(fc.getUI().getDefaultButton(fc));
});
}
}
---------- END SOURCE ----------
The default implementation in javax.swing.plaf.FileChooserUI#getDefaultButton returns null. It's overridden in BasicFileChooserUI to return getApproveButton which, in its turn, returns the Approve button in each Look and Feel.
AquaFileChooserUI does not extend BasicFileChooserUI, therefore the returned value remains null.
---------- BEGIN SOURCE ----------
import javax.swing.JFileChooser;
import javax.swing.SwingUtilities;
public class FileChooserDefaultButton {
public static void main(String[] args) throws Exception {
SwingUtilities.invokeAndWait(() -> {
JFileChooser fc = new JFileChooser();
System.out.println(fc.getUI().getDefaultButton(fc));
});
}
}
---------- END SOURCE ----------
- blocks
-
JDK-8299522 Incorrect size of Approve button in custom JFileChooser
-
- Resolved
-
-
JDK-8300549 JFileChooser Approve button tooltip is null in Aqua L&F in CUSTOM_DIALOG mode
-
- Resolved
-