--- old/test/jdk/java/awt/event/MouseEvent/MouseWheelEventAbsoluteCoordsTest/MouseWheelEventAbsoluteCoordsTest.java 2018-11-26 17:45:36.000000000 -0800 +++ new/test/jdk/java/awt/event/MouseEvent/MouseWheelEventAbsoluteCoordsTest/MouseWheelEventAbsoluteCoordsTest.java 2018-11-26 17:45:36.000000000 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -22,14 +22,15 @@ */ /* - test + @test + @key headful @bug 4992908 @summary Need way to get location of MouseEvent in screen coordinates - @author Andrei.Dmitriev area=event - @run applet MouseWheelEventAbsoluteCoordsTest.html + @library ../../../regtesthelpers + @build Util + @run main MouseWheelEventAbsoluteCoordsTest */ -import java.applet.Applet; import java.awt.*; import java.awt.event.*; import test.java.awt.regtesthelpers.Util; @@ -41,17 +42,21 @@ // getLocationOnScreen(), get(X|Y), getPoint() . -public class MouseWheelEventAbsoluteCoordsTest extends Applet implements MouseWheelListener +public class MouseWheelEventAbsoluteCoordsTest implements MouseWheelListener { Frame frame = new Frame("MouseWheelEvent Test Frame"); Point mousePositionOnScreen = new Point(200, 200); Point mousePosition = new Point(100, 100); - public void init() - { - this.setLayout (new BorderLayout ()); + public static void main(final String[] args) { + MouseWheelEventAbsoluteCoordsTest app = new MouseWheelEventAbsoluteCoordsTest(); + app.init(); + app.start(); + } + public void init() + { frame.addMouseWheelListener(this); }//End init() @@ -62,7 +67,6 @@ frame.setLocation(47, 47); frame.setVisible(true); - validate(); try { Util.waitForIdle(new Robot()); }catch (Exception e){