6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6981400
27 * @summary Tabbing between textfiled do not work properly when ALT+TAB
28 * @author anton.tarasov
29 * @library ../../regtesthelpers
30 * @build Util
31 * @run main Test1
32 */
33
34 // This test shows a frame with four focusable components: b0, b1, b2, b3.
35 // Then it presses Tab three times. EDT is freezed for a while on the first FOCUS_LOST event.
36 // Meantime, the test clicks in a component of another frame and then clicks in the title
37 // of the original frame. When EDT awakes and all the queued events get processed,
38 // the other frame should ones gain focus and then pass it to the original frame.
39 // The b3 component of the orinial frame should finally become a focus owner.
40 // The FOCUS_LOST/FOCUS_GAINED events order in the original frame is tracked and should be:
41 // b0 -> b1 -> b2 -> b3.
42
43 import java.awt.*;
44 import java.awt.event.*;
45 import java.util.ArrayList;
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @key headful
27 * @bug 6981400
28 * @summary Tabbing between textfiled do not work properly when ALT+TAB
29 * @author anton.tarasov
30 * @library ../../regtesthelpers
31 * @build Util
32 * @run main Test1
33 */
34
35 // This test shows a frame with four focusable components: b0, b1, b2, b3.
36 // Then it presses Tab three times. EDT is freezed for a while on the first FOCUS_LOST event.
37 // Meantime, the test clicks in a component of another frame and then clicks in the title
38 // of the original frame. When EDT awakes and all the queued events get processed,
39 // the other frame should ones gain focus and then pass it to the original frame.
40 // The b3 component of the orinial frame should finally become a focus owner.
41 // The FOCUS_LOST/FOCUS_GAINED events order in the original frame is tracked and should be:
42 // b0 -> b1 -> b2 -> b3.
43
44 import java.awt.*;
45 import java.awt.event.*;
46 import java.util.ArrayList;
|