diff --git a/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java b/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java index 44fa670c4f6..5b9c17d58ce 100644 --- a/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java +++ b/jdk/src/java.desktop/share/classes/java/awt/FileDialog.java @@ -174,6 +174,12 @@ public class FileDialog extends Dialog { * Creates a file dialog for loading a file. The title of the * file dialog is initially empty. This is a convenience method for * FileDialog(parent, "", LOAD). + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @since 1.1 @@ -187,6 +193,12 @@ public class FileDialog extends Dialog { * a file. The files shown are those in the current directory. * This is a convenience method for * FileDialog(parent, title, LOAD). + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @param title the title of the dialog @@ -204,6 +216,12 @@ public class FileDialog extends Dialog { * in the current directory. If the value of * mode is SAVE, the file dialog is finding * a place to write a file. + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @param title the title of the dialog @@ -224,6 +242,12 @@ public class FileDialog extends Dialog { * Creates a file dialog for loading a file. The title of the * file dialog is initially empty. This is a convenience method for * FileDialog(parent, "", LOAD). + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @exception java.lang.IllegalArgumentException if the parent's @@ -245,6 +269,12 @@ public class FileDialog extends Dialog { * a file. The files shown are those in the current directory. * This is a convenience method for * FileDialog(parent, title, LOAD). + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @param title the title of the dialog; a null value @@ -273,6 +303,12 @@ public class FileDialog extends Dialog { * in the current directory. If the value of * mode is SAVE, the file dialog is finding * a place to write a file. + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. * * @param parent the owner of the dialog * @param title the title of the dialog; a null value @@ -300,6 +336,22 @@ public class FileDialog extends Dialog { setLayout(null); } + + /** + * {@inheritDoc} + *

+ * Note: Some platforms may not support + * showing the user-specified title in a file dialog. + * In this situation, either no title will be displayed in the file dialog's + * title bar or, on some systems, the file dialog's title bar will not be + * displayed. + */ + @Override + public void setTitle(String title) { + super.setTitle(title); + } + + /** * Constructs a name for this component. Called by getName() * when the name is null.