24 import java.awt.Component;
25 import java.awt.Container;
26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.Toolkit;
29 import java.awt.event.InputEvent;
30 import java.awt.event.KeyEvent;
31 import java.io.File;
32 import java.io.IOException;
33 import javax.swing.JFileChooser;
34 import javax.swing.SwingUtilities;
35
36 import java.nio.file.Files;
37 import javax.swing.AbstractButton;
38 import javax.swing.JTable;
39 import javax.swing.UIManager;
40 import sun.awt.SunToolkit;
41
42 /**
43 * @test
44 * @bug 7199708
45 * @author Alexander Scherbatiy
46 * @summary FileChooser crashs when opening large folder
47 * @run main bug7199708
48 */
49 public class bug7199708 {
50
51 private static int FILE_NUMBER = 30000;
52 private static volatile JFileChooser fileChooser;
53 private static volatile int locationX;
54 private static volatile int locationY;
55 private static volatile int width;
56
57 public static void main(String[] args) throws Exception {
58
59 SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
60 Robot robot = new Robot();
61 robot.setAutoDelay(50);
62
63 final File folder = createLargeFolder();
|
24 import java.awt.Component;
25 import java.awt.Container;
26 import java.awt.Point;
27 import java.awt.Robot;
28 import java.awt.Toolkit;
29 import java.awt.event.InputEvent;
30 import java.awt.event.KeyEvent;
31 import java.io.File;
32 import java.io.IOException;
33 import javax.swing.JFileChooser;
34 import javax.swing.SwingUtilities;
35
36 import java.nio.file.Files;
37 import javax.swing.AbstractButton;
38 import javax.swing.JTable;
39 import javax.swing.UIManager;
40 import sun.awt.SunToolkit;
41
42 /**
43 * @test
44 * @key headful
45 * @bug 7199708
46 * @author Alexander Scherbatiy
47 * @summary FileChooser crashs when opening large folder
48 * @run main bug7199708
49 */
50 public class bug7199708 {
51
52 private static int FILE_NUMBER = 30000;
53 private static volatile JFileChooser fileChooser;
54 private static volatile int locationX;
55 private static volatile int locationY;
56 private static volatile int width;
57
58 public static void main(String[] args) throws Exception {
59
60 SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
61 Robot robot = new Robot();
62 robot.setAutoDelay(50);
63
64 final File folder = createLargeFolder();
|