6058N/A/*
6058N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
6058N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6058N/A *
6058N/A * This code is free software; you can redistribute it and/or modify it
6058N/A * under the terms of the GNU General Public License version 2 only, as
6058N/A * published by the Free Software Foundation. Oracle designates this
6058N/A * particular file as subject to the "Classpath" exception as provided
6058N/A * by Oracle in the LICENSE file that accompanied this code.
6058N/A *
6058N/A * This code is distributed in the hope that it will be useful, but WITHOUT
6058N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6058N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6058N/A * version 2 for more details (a copy is included in the LICENSE file that
6058N/A * accompanied this code).
6058N/A *
6058N/A * You should have received a copy of the GNU General Public License version
6058N/A * 2 along with this work; if not, write to the Free Software Foundation,
6058N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6058N/A *
6058N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6058N/A * or visit www.oracle.com if you need additional information or have any
6058N/A * questions.
6058N/A */
6058N/A
6058N/Aimport java.awt.Frame;
6058N/A
6058N/A/*
6058N/A @test
6058N/A @bug 7177173
6058N/A @summary setBounds can cause StackOverflow in case of the considerable loading
6058N/A @author Sergey Bylokhov
6058N/A*/
6058N/Apublic final class FrameSetSizeStressTest {
6058N/A
6058N/A public static void main(final String[] args) {
6058N/A final Frame frame = new Frame();
6058N/A frame.setSize(200, 200);
6058N/A frame.setLocationRelativeTo(null);
6058N/A frame.setVisible(true);
6058N/A for (int i = 0; i < 1000; ++i) {
6058N/A frame.setSize(100, 100);
6058N/A frame.setSize(200, 200);
6058N/A frame.setSize(300, 300);
6058N/A }
6058N/A }
6058N/A}