Commit 0e9c5ae authored and committed Feb 18, 2021
1 parent e9f3aab commit 0e9c5ae Copy full SHA for 0e9c5ae
File tree 1 file changed +9
-9
lines changed
test/jdk/javax/swing/JFileChooser/6698013
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 21
21
* questions.
22
22
*/
23
23
24
- /* @test %W% %E%
24
+ /* @test
25
25
@bug 6698013
26
26
@summary JFileChooser can no longer navigate non-local file systems.
27
- @author Pavel Porvatov
28
27
@run applet/manual=done bug6698013.html
29
28
*/
30
29
31
- import javax .swing .*;
32
- import javax .swing .filechooser .FileSystemView ;
33
30
import java .io .File ;
34
31
32
+ import javax .swing .JApplet ;
33
+ import javax .swing .JFileChooser ;
34
+ import javax .swing .SwingUtilities ;
35
+ import javax .swing .filechooser .FileSystemView ;
36
+
35
37
public class bug6698013 extends JApplet {
36
38
37
39
final static VirtualFile root = new VirtualFile ("testdir" , true );
@@ -42,16 +44,14 @@ public class bug6698013 extends JApplet {
42
44
43
45
final static VirtualFile subdirFile = new VirtualFile ("testdir/subdir/subtest.txt" , false );
44
46
45
- public static void main (String [] args ) {
46
- JFileChooser chooser = new JFileChooser (new VirtualFileSystemView ());
47
- chooser .setCurrentDirectory (root );
48
- chooser .showSaveDialog (null );
47
+ public static void main (String [] args ) throws Exception {
48
+ SwingUtilities .invokeAndWait (() -> new bug6698013 ().init ());
49
49
}
50
50
51
51
public void init () {
52
52
JFileChooser chooser = new JFileChooser (new VirtualFileSystemView ());
53
53
chooser .setCurrentDirectory (root );
54
- chooser .showSaveDialog (null );
54
+ chooser .showOpenDialog (null );
55
55
}
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments