/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
/*
@test
@bug 4823903
@summary Tests actual focused window retaining.
@author Anton.Tarasov: area=awt.focus
@library ../../regtesthelpers
@build Util
@run main ActualFocusedWindowRetaining
*/
public static int step;
a.init();
a.start();
}
public void start () {
public void eventDispatched(AWTEvent e) {
if (cls == TestWindow.class) {
} else {
}
}
setVisible(true);
validate();
frame.setVisible(true);
owner.setVisible(true);
window1.setVisible(true);
window2.setVisible(true);
// Wait longer...
test();
}
public void test() {
step = 1;
for (int i = 0; i < 3; i++) {
step++;
}
step = 4;
step = 5;
step = 6;
step = 7;
window1.setVisible(false);
step = 8;
window1.setVisible(true);
}
}
}
if (!checkFocusedWindow(focusedWindow)) {
stopTest("Test failed: actual focused window didn't get a focus");
}
if (!checkFocusOwner(focusedComp)) {
stopTest("Test failed: actual focus owner didn't get a focus");
}
}
}
}
}
if (!checkFocusOwner(c)) {
stopTest("Error: can't bring a focus on Component by clicking on it");
}
}
if (!checkFocusedWindow(f)) {
stopTest("Error: can't bring a focus on Frame by clicking on it");
}
}
}
}
super(owner);
setLayout(new FlowLayout());
setLocation(x, y);
pack();
}
}