97 frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
98
99 d = new Dimension(100, 100);
100
101 panel1.setPreferredSize(d);
102 panel2.setPreferredSize(d);
103
104 Container content = frame.getContentPane();
105 content.setLayout(new GridLayout(1, 2, 5, 5));
106 content.add(panel1);
107 content.add(panel2);
108
109 frame.pack();
110
111 DropObject drop = new DropObject();
112 drop.place(panel1, new Point(10, 10));
113 frame.setVisible(true);
114 }
115
116 public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException {
117 if (!Platform.isLinux() && !Platform.isSolaris()) {
118 System.out.println("This test is for Linux and Solaris only... " +
119 "skipping!");
120 return;
121 }
122
123 final bug8024061[] dnd = {null};
124 SwingUtilities.invokeAndWait(new Runnable() {
125 @Override
126 public void run() {
127 dnd[0] = new bug8024061();
128 }
129 });
130 final Robot robot = new Robot();
131 robot.setAutoDelay(10);
132 robot.waitForIdle();
133 robot.delay(200);
134
135 JFrame frame = dnd[0].frame;
136 SwingUtilities.invokeAndWait(() -> {
137 here = panel1.getLocationOnScreen();
138 there = panel2.getLocationOnScreen();
139 });
|
97 frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
98
99 d = new Dimension(100, 100);
100
101 panel1.setPreferredSize(d);
102 panel2.setPreferredSize(d);
103
104 Container content = frame.getContentPane();
105 content.setLayout(new GridLayout(1, 2, 5, 5));
106 content.add(panel1);
107 content.add(panel2);
108
109 frame.pack();
110
111 DropObject drop = new DropObject();
112 drop.place(panel1, new Point(10, 10));
113 frame.setVisible(true);
114 }
115
116 public static void main(String[] args) throws AWTException, InvocationTargetException, InterruptedException {
117 if (!Platform.isLinux()) {
118 System.out.println("This test is for Linux only... skipping!");
119 return;
120 }
121
122 final bug8024061[] dnd = {null};
123 SwingUtilities.invokeAndWait(new Runnable() {
124 @Override
125 public void run() {
126 dnd[0] = new bug8024061();
127 }
128 });
129 final Robot robot = new Robot();
130 robot.setAutoDelay(10);
131 robot.waitForIdle();
132 robot.delay(200);
133
134 JFrame frame = dnd[0].frame;
135 SwingUtilities.invokeAndWait(() -> {
136 here = panel1.getLocationOnScreen();
137 there = panel2.getLocationOnScreen();
138 });
|