-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
7
-
None
-
x86
-
linux_ubuntu
JDK 7 ea (build 1.7.0-ea-b143)
Linux (ubuntu 10.10)
GTK look and feel
The bug manifests in NetBeans as
http://netbeans.org/bugzilla/show_bug.cgi?id=197212
The following sample code shows the problem:
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
} catch (Exception ex) {
Logger.getLogger(JFileChooserTest.class.getName()).log(Level.SEVERE, null, ex);
}
JFileChooser chooser = new JFileChooser();
chooser.setFileHidingEnabled(false);
chooser.setAcceptAllFileFilterUsed(false);
chooser.setMultiSelectionEnabled(true);
chooser.setDialogTitle("TXT_OpenClasses");
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.setApproveButtonText("CTL_SelectCP");
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
System.out.println(Arrays.toString(chooser.getSelectedFiles()));;
}
}
For single selection it prints out correctly
[/home/tonda/a.txt]
For three selected files it prints incorrectly
[/home/tonda/ "a.txt" "b.txt" "c.txt"]
instead of the expected
[/home/tonda/a.txt, /home/tonda/b.txt, /home/tonda/c.txt]
Linux (ubuntu 10.10)
GTK look and feel
The bug manifests in NetBeans as
http://netbeans.org/bugzilla/show_bug.cgi?id=197212
The following sample code shows the problem:
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
} catch (Exception ex) {
Logger.getLogger(JFileChooserTest.class.getName()).log(Level.SEVERE, null, ex);
}
JFileChooser chooser = new JFileChooser();
chooser.setFileHidingEnabled(false);
chooser.setAcceptAllFileFilterUsed(false);
chooser.setMultiSelectionEnabled(true);
chooser.setDialogTitle("TXT_OpenClasses");
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.setApproveButtonText("CTL_SelectCP");
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
System.out.println(Arrays.toString(chooser.getSelectedFiles()));;
}
}
For single selection it prints out correctly
[/home/tonda/a.txt]
For three selected files it prints incorrectly
[/home/tonda/ "a.txt" "b.txt" "c.txt"]
instead of the expected
[/home/tonda/a.txt, /home/tonda/b.txt, /home/tonda/c.txt]
- duplicates
-
JDK-6977587 GTK L&F: jnlp: java.io.IOException thrown when choosing more than 1 file in the dialog
-
- Closed
-
- relates to
-
JDK-6351074 JFileChooser removes leading space in filename
-
- Closed
-