Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
FULL PRODUCT VERSION : java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Versione 5.1.2600] EXTRA RELEVANT SYSTEM CONFIGURATION : I tested the problem only on Italian Windows, for the bug type i think could be relevant. A DESCRIPTION OF THE PROBLEM : If you use JFileChooser with: setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES) and setCurrentDirectory (new java.io.File(".")) the header grid in the "detail" mode is wrong. see below for more detail. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : compile and run the program attached. click on the push button "datail" in the right-top corner. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - this is the Expected Result: http://img205.imageshack.us/img205/384/50ng0.gif the header value correspond to the column content ACTUAL - this it the actual result: http://img181.imageshack.us/img181/4775/60cs9.gif the third header value is "last edited time" but the column content is "file type" there is a mismatch between the header and the column content note: if you change directory, the header change to the correct one REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.util.*; import java.awt.*; import java.awt.event.*; import java.awt.font.*; import javax.swing.*; import java.io.*; public class T2 { public static void main (String argv[]) { JFileChooser theDialog = new JFileChooser ("."); theDialog.setAcceptAllFileFilterUsed (false); theDialog.setDialogTitle("Prova 2"); theDialog.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); theDialog.setCurrentDirectory (new java.io.File(".")); theDialog.showOpenDialog(null); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : use: CurrentDirectory (new java.io.File("absolute url")); insted of: CurrentDirectory (new java.io.File(".")); Release Regression From : 5.0u10 The above release value was the last known release where this bug was not reproducible. Since then there has been a regression.
|