United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6213540 Win L&F: WindowsFileChooserUI Does Not Support Windows 2003, Windows Vista
JDK-6213540 : Win L&F: WindowsFileChooserUI Does Not Support Windows 2003, Windows Vista

Details
Type:
Bug
Submit Date:
2005-01-03
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2005-10-12
Component:
client-libs
OS:
windows_2003
Sub-Component:
javax.swing
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Relates:

Sub Tasks

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
                                     
2005-01-04
WORK AROUND

Start application with -Dos.name="Windows 2000"

###@###.### 2005-1-04 18:34:20 GMT
                                     
2005-01-04



Hardware and Software, Engineered to Work Together