2362N/A * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved. 111N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 111N/A * This code is free software; you can redistribute it and/or modify it 111N/A * under the terms of the GNU General Public License version 2 only, as 111N/A * published by the Free Software Foundation. 111N/A * This code is distributed in the hope that it will be useful, but WITHOUT 111N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 111N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 111N/A * version 2 for more details (a copy is included in the LICENSE file that 111N/A * accompanied this code). 111N/A * You should have received a copy of the GNU General Public License version 111N/A * 2 along with this work; if not, write to the Free Software Foundation, 111N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 111N/A @summary Tests restoring focus on a single disabled coponent 111N/A @author Anton Tarasov: area=awt-focus 111N/A @library ../../regtesthelpers 111N/A @run main RestoreFocusOnDisabledComponentTest 111N/A * The bug is not reproducible on Windows. 111N/A // Trying to emulate timings. b1 should be disabled just by the time it gets 111N/A // FOCUS_GAINED event. The latter is a result of disabling b0 that initiates 111N/A // focus auto transfer. 111N/A // Initiating focus auto transfer. 111N/A // Focus will be requested to b1. When FOCUS_GAINED is being dispatched to b1, it will 111N/A // be disabled. This will trigger focus restoring. Focus will be requested to b0 (the 111N/A // last opposite component). When FOCUS_GAINED is being dispatched to b0, it will 111N/A // also be disabled. However, the last opposite component (and the most recent focus owner) 111N/A // will still be b0. When DKFM initiates focus restoring it should detect restoring 111N/A // on the same component and break.