test/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java

Print this page




  33 import javax.swing.JButton;
  34 import javax.swing.JFrame;
  35 import javax.swing.JPanel;
  36 import javax.swing.JScrollPane;
  37 import javax.swing.JSplitPane;
  38 import javax.swing.SwingUtilities;
  39 import test.java.awt.regtesthelpers.Util;
  40 
  41 /**
  42  * AWT/Swing overlapping test for {@link javax.swing.JSplitPane } component.
  43  * <p>This test puts heavyweight and lightweight components into different
  44  * panels and test if splitter image and components itself are drawn correctly.
  45  * <p>See base class for test info.
  46  */
  47 /*
  48  * @test
  49  * @key headful
  50  * @bug 6986109
  51  * @summary Overlapping test for javax.swing.JSplitPane
  52  * @author sergey.grinev@oracle.com: area=awt.mixing
  53  * @library ../../regtesthelpers
  54  * @modules java.desktop/sun.awt
  55  *          java.desktop/java.awt.peer

  56  * @build Util
  57  * @run main JSplitPaneOverlapping
  58  */
  59 public class JSplitPaneOverlapping extends OverlappingTestBase {
  60 
  61     private boolean clicked = false;
  62     private Point splitterLoc;
  63     private JScrollPane sp1;
  64     private JScrollPane sp2;
  65 
  66     protected void prepareControls() {
  67         JFrame frame = new JFrame("SplitPane Mixing");
  68         JPanel p = new JPanel(new GridLayout());
  69         p.setPreferredSize(new Dimension(500, 500));
  70         propagateAWTControls(p);
  71         sp1 = new JScrollPane(p);
  72 
  73         JButton button = new JButton("JButton");
  74         button.setBackground(Color.RED);
  75         button.addActionListener(new ActionListener() {




  33 import javax.swing.JButton;
  34 import javax.swing.JFrame;
  35 import javax.swing.JPanel;
  36 import javax.swing.JScrollPane;
  37 import javax.swing.JSplitPane;
  38 import javax.swing.SwingUtilities;
  39 import test.java.awt.regtesthelpers.Util;
  40 
  41 /**
  42  * AWT/Swing overlapping test for {@link javax.swing.JSplitPane } component.
  43  * <p>This test puts heavyweight and lightweight components into different
  44  * panels and test if splitter image and components itself are drawn correctly.
  45  * <p>See base class for test info.
  46  */
  47 /*
  48  * @test
  49  * @key headful
  50  * @bug 6986109
  51  * @summary Overlapping test for javax.swing.JSplitPane
  52  * @author sergey.grinev@oracle.com: area=awt.mixing
  53  * @library /java/awt/patchlib  ../../regtesthelpers
  54  * @modules java.desktop/sun.awt
  55  *          java.desktop/java.awt.peer
  56  * @build java.desktop/java.awt.Helper
  57  * @build Util
  58  * @run main JSplitPaneOverlapping
  59  */
  60 public class JSplitPaneOverlapping extends OverlappingTestBase {
  61 
  62     private boolean clicked = false;
  63     private Point splitterLoc;
  64     private JScrollPane sp1;
  65     private JScrollPane sp2;
  66 
  67     protected void prepareControls() {
  68         JFrame frame = new JFrame("SplitPane Mixing");
  69         JPanel p = new JPanel(new GridLayout());
  70         p.setPreferredSize(new Dimension(500, 500));
  71         propagateAWTControls(p);
  72         sp1 = new JScrollPane(p);
  73 
  74         JButton button = new JButton("JButton");
  75         button.setBackground(Color.RED);
  76         button.addActionListener(new ActionListener() {