< prev index next >

test/jdk/java/awt/Multiscreen/WindowGCChangeTest/WindowGCChangeTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,68 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 4868278 ! @summary Tests that GraphicsConfig for invisible (peerless) window is updated after showing the window - @author artem.ananiev, area=awt.multiscreen @library ../../regtesthelpers @build Util ! @run applet WindowGCChangeTest.html */ - import java.applet.Applet; - import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; ! public class WindowGCChangeTest extends Applet ! { ! public void init() ! { ! } ! public void start() ! { Robot robot = null; try { robot = new Robot(); } catch (Exception z) { z.printStackTrace(System.err); throw new RuntimeException("Test FAILED: couldn't create Robot instance", z); } - - setSize(200, 200); - setVisible(true); - validate(); Util.waitForIdle(robot); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gds = ge.getScreenDevices(); // check 2-screens systems only --- 20,57 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 4868278 ! @summary Tests that GraphicsConfig for invisible (peerless) windows is updated after showing the window @library ../../regtesthelpers @build Util ! @run main WindowGCChangeTest */ import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; ! public class WindowGCChangeTest { ! public static void main(final String[] args) { Robot robot = null; try { robot = new Robot(); } catch (Exception z) { z.printStackTrace(System.err); throw new RuntimeException("Test FAILED: couldn't create Robot instance", z); } Util.waitForIdle(robot); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gds = ge.getScreenDevices(); // check 2-screens systems only
< prev index next >