< prev index next >

test/jdk/java/awt/Window/HandleWindowDestroyTest/HandleWindowDestroyTest.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2005, 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. Oracle designates this --- 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. Oracle designates this
*** 22,55 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! test @bug 6260648 @summary Tests that WINDOW_DESTROY event can be handled by overriding handleEvent(). Also, tests that handleEvent() is not called by AWT if any listener is added to the component (i. e. when post-1.1 events schema is used) ! @author artem.ananiev: area=awt.event ! @run applet HandleWindowDestroyTest.html */ - import java.applet.*; - import java.awt.*; import java.awt.event.*; ! public class HandleWindowDestroyTest extends Applet ! { ! private volatile boolean handleEventCalled; ! ! public void start () ! { ! setSize (200,200); ! setVisible(true); ! validate(); Robot robot; try { robot = new Robot(); }catch(Exception ex) { ex.printStackTrace(); --- 22,48 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* ! @test ! @key headful @bug 6260648 @summary Tests that WINDOW_DESTROY event can be handled by overriding handleEvent(). Also, tests that handleEvent() is not called by AWT if any listener is added to the component (i. e. when post-1.1 events schema is used) ! @run main HandleWindowDestroyTest */ import java.awt.*; import java.awt.event.*; ! public class HandleWindowDestroyTest { ! ! private static volatile boolean handleEventCalled; + public static void main(final String[] args) { Robot robot; try { robot = new Robot(); }catch(Exception ex) { ex.printStackTrace();
< prev index next >