-
Bug
-
Resolution: Won't Fix
-
P4
-
1.4.2
-
x86
-
windows_2000
Name: gm110360 Date: 09/20/2003
FULL PRODUCT VERSION :
C:\Documents and Settings\tmpuser>java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
&
Windows 2000.
A DESCRIPTION OF THE PROBLEM :
1.4.x JVM doesn't auto set up the title for FileDialog without specifing a title string.
We don't want to specify the String: "Open" or "Save", because of the locolization issue. Say, if we specified "Open", how about French, Japanese, or Chinese, etc.
-------------------------------------------------------------------
FileDialog aFileDialog = new FileDialog(aFrame);
aFileDialog.setMode(m_mode); //0 for open, 1 for save
-------------------------------------------------------------------
1.3 and early JVM will auto set up the title. 1.4.x and up doesn't set up the title of the FileDialog.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just popup a FileDialog.
No title for FileDialog without specifing a title for FileDialog.
We don't want to specify the String: "Open" or "Save", because of the locolization issue. Say, if we specified "Open", how about French, Japanese, or Chinese, etc.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
public class DisplayFileDialog {
public static void main(String[] args) {
// no need to handle window-closing operations
// because the frame is not visible, only the dialog
Frame f = new Frame();
FileDialog d = new FileDialog(f);
d.setMode(0);
d.setVisible(true);
String selectedItem = d.getFile();
if (selectedItem == null)
selectedItem = "No file selection.";
System.out.println("You selected: " + selectedItem);
f.dispose();
System.exit(0);
}
}
---------- END SOURCE ----------
Release Regression From : 1.3.1_08
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Incident Review ID: 182671)
======================================================================
- duplicates
-
JDK-4957673 REGRESSION: FileDialog class cannot auto set up the title
- Closed