JDK-6213540 : Win L&F: WindowsFileChooserUI Does Not Support Windows 2003, Windows Vista
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2005-01-03
  • Updated: 2010-04-02
  • Resolved: 2005-10-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other JDK 6
1.4.2_19-revFixed 1.4.2_20Fixed 6 b56Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 5.2.3790]

A DESCRIPTION OF THE PROBLEM :
The WindowsFileChooserUI  contains a table of strings listing OS versions:
   private static final String[] OS_NAMES =
		new String[] { "Windows 3.1", "Windows 95", "Windows NT",
			       "Windows 98", "Windows 2000", "Windows Me", "Windows XP" };
This table does not include Windows 2003, and as a result, the UI created is incorrect

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached test case

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expect a standard 2003 File Chooser (or something close), including the office bar on the left, and standard icons.
ACTUAL -
I get a cartoonish dialog that looks nothing like a Windows 2003 file chooser

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.JFileChooser;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;

public class FileChooserDemo {
	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel(new WindowsLookAndFeel());
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
		JFileChooser chooser = new JFileChooser();
		chooser.showOpenDialog(null);
	}
}
---------- END SOURCE ----------
###@###.### 2005-1-03 23:11:56 GMT

Comments
EVALUATION This bug is reproducible with FileChooserDemo (no need for separate test case). ###@###.### 2005-1-04 18:34:19 GMT
04-01-2005

WORK AROUND Start application with -Dos.name="Windows 2000" ###@###.### 2005-1-04 18:34:20 GMT
04-01-2005