| Other |
|---|
| 5.0 b35Fixed |
|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Name: iaR10016 Date: 09/15/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.5.0-b19, JDK1.4.2-b28
Platform : all
JFileChooser works with keyboard incorrectly sometimes.
Please, run doit.sh script below:
--------- test.java ---------
import javax.swing.*;
public class test {
public static void main(String[] args) {
(new JFileChooser("./dir1")).showOpenDialog(new JFrame());
System.out.println("OK!");
}
}
---------- doit.sh ----------
#!/bin/bash
mkdir dir1
mkdir dir1/dir11
mkdir dir1/dir11/dir111
mkdir dir1/dir11/dir112
mkdir dir1/dir12
mkdir dir1/dir13
mkdir dir1/dir14
mkdir dir1/dir15
mkdir dir1/dir15/dir151
mkdir dir1/dir15/dir152
JDK="/net/linux-15/export/home/java/jdk1.5.0/linux"
export PATH=.:$PATH
$JDK/bin/javac test.java
$JDK/bin/java test
-----------------------------
JFileChooser appears after the test class loading. Current directory is "dir1".
Please, do the following steps to reproduce the failure:
1. Move the focus to the file list panel (do not use mouse!) - you need to press <Tab> key
10 times to do it. Now focus is in the file panel. There is no files selected, so the
cursor is not highlighted.
2. After the pressing <Down> key, "dir11" directory becomes selected. This is correct
expected behavior.
3. Move the cursor to "dir15" pressing <Down> key several times, then press <Enter> and
enter "dir15" directory.
4. Try to play with keyboard when you are inside "dir15" directory: you will see that
it is impossible to select any files in the file list using keyboard now.
Please, note that all is OK with "dir11" directory - if you enter it, all is OK there
and file list can correctly get focus without mouse. It happens because "dir11" is the
first directory in the "dir1" file list and 1 is less then the number of the files in
"dir11" folder (2), whereas "dir15" is fifth file in "dir1" files list and the file
number in "dir15" (2) is less then 5.
======================================================================
|