test/jdk/java/awt/Focus/RequestFocusToDisabledCompTest/RequestFocusToDisabledCompTest.java
changeset 54231 e4813eded7cb
parent 47216 71c04702a3d5
equal deleted inserted replaced
54230:d9d9655bb077 54231:e4813eded7cb
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    24 /*
    24 /*
    25   @test
    25   @test
    26   @key headful
    26   @key headful
    27   @bug       4685768
    27   @bug       4685768
    28   @summary   Tests that it's possible to manually request focus on a disabled component.
    28   @summary   Tests that it's possible to manually request focus on a disabled component.
    29   @author    Anton Tarasov: area=awt.focus
       
    30   @library   ../../regtesthelpers
    29   @library   ../../regtesthelpers
    31   @build     Util
    30   @build     Util
    32   @run       main RequestFocusToDisabledCompTest
    31   @run       main RequestFocusToDisabledCompTest
    33 */
    32 */
    34 
    33 
    35 import java.awt.Robot;
    34 import java.awt.Robot;
    36 import javax.swing.*;
    35 import javax.swing.*;
    37 import java.awt.*;
    36 import java.awt.*;
    38 import java.awt.event.*;
       
    39 import java.applet.Applet;
       
    40 import test.java.awt.regtesthelpers.Util;
    37 import test.java.awt.regtesthelpers.Util;
    41 
    38 
    42 public class RequestFocusToDisabledCompTest extends Applet {
    39 public class RequestFocusToDisabledCompTest {
    43     Robot robot;
    40     Robot robot;
    44     JFrame frame = new JFrame("Frame");
    41     JFrame frame = new JFrame("Frame");
    45     JButton b0 = new JButton("b0");
    42     JButton b0 = new JButton("b0");
    46     JButton b1 = new JButton("b1");
    43     JButton b1 = new JButton("b1");
    47 
    44