5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 @test
26 @bug 6232687
27 @summary Tests that Window.setLocationRelativeTo() method works correctly
28 for different multiscreen configurations
29 @author artem.ananiev, area=awt.multiscreen
30 @library ../../regtesthelpers
31 @build Util
32 @run main LocationRelativeToTest
33 */
34
35 import java.awt.*;
36 import java.awt.event.*;
37
38 import javax.swing.*;
39
40 import test.java.awt.regtesthelpers.Util;
41
42 public class LocationRelativeToTest
43 {
44 private static int FRAME_WIDTH = 400;
45 private static int FRAME_HEIGHT = 300;
46
47 public static void main(String[] args)
48 {
49 Robot r = Util.createRobot();
50
51 GraphicsEnvironment ge =
52 GraphicsEnvironment.getLocalGraphicsEnvironment();
53 System.out.println("Center point: " + ge.getCenterPoint());
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @key headful
27 * @bug 6232687
28 * @summary Tests that Window.setLocationRelativeTo() method works correctly
29 * for different multiscreen configurations
30 * @author artem.ananiev, area=awt.multiscreen
31 * @library ../../regtesthelpers
32 * @build Util
33 * @run main LocationRelativeToTest
34 */
35
36 import java.awt.*;
37 import java.awt.event.*;
38
39 import javax.swing.*;
40
41 import test.java.awt.regtesthelpers.Util;
42
43 public class LocationRelativeToTest
44 {
45 private static int FRAME_WIDTH = 400;
46 private static int FRAME_HEIGHT = 300;
47
48 public static void main(String[] args)
49 {
50 Robot r = Util.createRobot();
51
52 GraphicsEnvironment ge =
53 GraphicsEnvironment.getLocalGraphicsEnvironment();
54 System.out.println("Center point: " + ge.getCenterPoint());
|