JDK-6589634 : Unable to view focus on "Up one level", "create new folder" etc. of JFileChooser Dialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0,6u2,6u10,7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5.1,windows,windows_xp
  • CPU: generic,x86,sparc
  • Submitted: 2007-08-06
  • Updated: 2011-01-19
  • Resolved: 2009-09-16
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.
JDK 7
7 b72Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
PROBLEM DESCRIPTION

Unable to view focus for the following JFileChooser options on windows XP in "windows Classic" theme only:

a) Up One Level
b) Create New Folder
c) List
d) Details

TESTCASE DESCRIPTION

Please change the default theme of windows XP to "Windows Classic" to reproduce the problem.

STEPS TO REPRODUCE

1. Install the above mentioned IBM JDK6 build.Set PATH to java.

2. Change the windows theme to "windows classic". By default Win XP has "Windows XP" theme shown, which can be changed through desktop properties.

3. Run the test case

4. Click on button to show FileChooser Dialog

5. Do "ALT+I" in order to select "Look in".

6. Select "C:\" using keyboard in "Look in" option.

7. Use "TAB" to go to next object in the file chooser dialog i.e "Up One Level" icon.

Observed result:
	Focus is not visible.
Expected result:
	Focus should be visible.




import javax.swing.*;
import java.awt.event.*;

class JFileChooserTest extends JFrame implements ActionListener{
	JFileChooserTest(){
		JPanel p = new JPanel();
		JButton jbutFileChooser = new JButton("File Chooser");
		jbutFileChooser.addActionListener(this);
		try {
       		         UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
	        }catch(Exception e) { }
		p.add(jbutFileChooser);
		this.getContentPane().add(p);
		this.setVisible(true);
		this.setSize(200,200);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	public void actionPerformed(ActionEvent ae){
		try{
			JFileChooser fileChooser = new JFileChooser();
			int retValue = fileChooser.showOpenDialog(this);
		}catch (Exception e){
			e.printStackTrace();
		}
	}
	public static void main(String[] args){
		JFileChooserTest j = new JFileChooserTest();
	}
}

Comments
EVALUATION Some buttons should be removed from TAB stop like in native FileChooser. The other buttons should show self focus.
17-08-2007

WORK AROUND None
06-08-2007