< prev index next >
test/jdk/java/awt/Mixing/AWT_Mixing/FrameBorderCounter.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, 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) 2014, 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.
*** 18,36 ****
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Point;
import java.awt.Robot;
- import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
! import java.awt.event.WindowEvent;
! import java.awt.event.WindowAdapter;
public class FrameBorderCounter {
private static Frame frame;
private static Frame background;
--- 18,35 ----
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Point;
import java.awt.Robot;
import java.awt.event.MouseAdapter;
! import java.awt.event.MouseEvent;
public class FrameBorderCounter {
private static Frame frame;
private static Frame background;
*** 57,66 ****
--- 56,66 ----
}
});
background.setVisible(true);
}
});
+ robot.waitForIdle();
EventQueue.invokeAndWait(new Runnable() {
public void run() {
frame = new Frame("Frame");
frame.setBounds(200, 200, 100, 100);
frame.setVisible(true);
< prev index next >