< prev index next >

test/java/awt/Robot/MultiScreenRobotPosition/MultiScreenRobotPosition.java

Print this page
rev 17435 : 8183286: Some java/awt and javax/swing tests miss headful jtreg keyword


  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 import java.awt.Frame;
  25 import java.awt.GraphicsDevice;
  26 import java.awt.GraphicsEnvironment;
  27 import java.awt.Rectangle;
  28 import java.awt.Robot;
  29 import java.awt.event.MouseAdapter;
  30 import java.awt.event.MouseEvent;
  31 
  32 /**
  33  * @test

  34  * @bug 8176009
  35  */
  36 public class MultiScreenRobotPosition {
  37 
  38     private static volatile boolean fail = true;
  39 
  40     public static void main(String[] args) throws Exception {
  41         GraphicsDevice[] sds = GraphicsEnvironment.getLocalGraphicsEnvironment()
  42                                                   .getScreenDevices();
  43         for (final GraphicsDevice gd : sds) {
  44             fail = true;
  45             Robot robot = new Robot(gd);
  46             robot.setAutoDelay(100);
  47             robot.setAutoWaitForIdle(true);
  48 
  49             Frame frame = new Frame(gd.getDefaultConfiguration());
  50             frame.setUndecorated(true);
  51             frame.setSize(400, 400);
  52             frame.setVisible(true);
  53             robot.waitForIdle();




  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 import java.awt.Frame;
  25 import java.awt.GraphicsDevice;
  26 import java.awt.GraphicsEnvironment;
  27 import java.awt.Rectangle;
  28 import java.awt.Robot;
  29 import java.awt.event.MouseAdapter;
  30 import java.awt.event.MouseEvent;
  31 
  32 /**
  33  * @test
  34  * @key headful
  35  * @bug 8176009
  36  */
  37 public class MultiScreenRobotPosition {
  38 
  39     private static volatile boolean fail = true;
  40 
  41     public static void main(String[] args) throws Exception {
  42         GraphicsDevice[] sds = GraphicsEnvironment.getLocalGraphicsEnvironment()
  43                                                   .getScreenDevices();
  44         for (final GraphicsDevice gd : sds) {
  45             fail = true;
  46             Robot robot = new Robot(gd);
  47             robot.setAutoDelay(100);
  48             robot.setAutoWaitForIdle(true);
  49 
  50             Frame frame = new Frame(gd.getDefaultConfiguration());
  51             frame.setUndecorated(true);
  52             frame.setSize(400, 400);
  53             frame.setVisible(true);
  54             robot.waitForIdle();


< prev index next >