27 import java.awt.Robot;
28 import java.awt.event.ActionEvent;
29 import java.awt.event.ActionListener;
30 import javax.swing.BoxLayout;
31 import javax.swing.JComboBox;
32 import javax.swing.JFrame;
33 import test.java.awt.regtesthelpers.Util;
34
35
36 /**
37 * AWT/Swing overlapping test for {@link javax.swing.JCombobox } component.
38 * <p>This test creates combobox and test if heavyweight component is drawn correctly then dropdown is shown.
39 * <p>See base class for details.
40 */
41 /*
42 @test
43 @summary Overlapping test for javax.swing.JScrollPane
44 @author sergey.grinev@oracle.com: area=awt.mixing
45 @library ../../regtesthelpers
46 @modules java.desktop/sun.awt
47 @build Util
48 @run main JComboBoxOverlapping
49 */
50 public class JComboBoxOverlapping extends OverlappingTestBase {
51
52 private boolean lwClicked = false;
53 private Point loc;
54 private Point loc2;
55
56 {testEmbeddedFrame = true;}
57
58 protected void prepareControls() {
59 final JFrame frame = new JFrame("Mixing : Dropdown Overlapping test");
60 frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS));
61 frame.setSize(200, 200);
62 frame.setVisible(true);
63
64 final JComboBox cb = new JComboBox(petStrings);
65 cb.setPreferredSize(new Dimension(frame.getContentPane().getWidth(), 20));
66 cb.addActionListener(new ActionListener() {
|
27 import java.awt.Robot;
28 import java.awt.event.ActionEvent;
29 import java.awt.event.ActionListener;
30 import javax.swing.BoxLayout;
31 import javax.swing.JComboBox;
32 import javax.swing.JFrame;
33 import test.java.awt.regtesthelpers.Util;
34
35
36 /**
37 * AWT/Swing overlapping test for {@link javax.swing.JCombobox } component.
38 * <p>This test creates combobox and test if heavyweight component is drawn correctly then dropdown is shown.
39 * <p>See base class for details.
40 */
41 /*
42 @test
43 @summary Overlapping test for javax.swing.JScrollPane
44 @author sergey.grinev@oracle.com: area=awt.mixing
45 @library ../../regtesthelpers
46 @modules java.desktop/sun.awt
47 java.desktop/java.awt.peer
48 @build Util
49 @run main JComboBoxOverlapping
50 */
51 public class JComboBoxOverlapping extends OverlappingTestBase {
52
53 private boolean lwClicked = false;
54 private Point loc;
55 private Point loc2;
56
57 {testEmbeddedFrame = true;}
58
59 protected void prepareControls() {
60 final JFrame frame = new JFrame("Mixing : Dropdown Overlapping test");
61 frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS));
62 frame.setSize(200, 200);
63 frame.setVisible(true);
64
65 final JComboBox cb = new JComboBox(petStrings);
66 cb.setPreferredSize(new Dimension(frame.getContentPane().getWidth(), 20));
67 cb.addActionListener(new ActionListener() {
|