--- a/jdk/src/share/classes/javax/swing/JFileChooser.java Thu Jun 05 13:30:41 2008 +0400
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java Fri Jun 06 13:30:20 2008 +0400
@@ -770,7 +770,8 @@
* @since 1.4
*/
protected JDialog createDialog(Component parent) throws HeadlessException {
- String title = getUI().getDialogTitle(this);
+ FileChooserUI ui = getUI();
+ String title = ui.getDialogTitle(this);
putClientProperty(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY,
title);
@@ -794,6 +795,7 @@
dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);
}
}
+ dialog.getRootPane().setDefaultButton(ui.getDefaultButton(this));
dialog.pack();
dialog.setLocationRelativeTo(parent);