< prev index next >

test/javax/swing/ToolTipManager/7123767/bug7123767.java

Print this page




   4  *
   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
   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 /* @test
  25    @bug 7123767
  26    @summary Wrong tooltip location in Multi-Monitor configurations
  27    @author Vladislav Karnaukhov
  28    @run main bug7123767
  29 */















  30 
  31 import sun.awt.SunToolkit;
  32 
  33 import javax.swing.*;
  34 import javax.swing.plaf.metal.MetalLookAndFeel;
  35 import java.awt.*;
  36 import java.awt.event.MouseEvent;
  37 import java.lang.reflect.InvocationTargetException;
  38 
  39 public class bug7123767 extends JFrame {
  40 
  41     private static class TestFactory extends PopupFactory {
  42 
  43         private static TestFactory newFactory = new TestFactory();
  44         private static PopupFactory oldFactory;
  45 
  46         private TestFactory() {
  47             super();
  48         }
  49 




   4  *
   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
   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 /**
  26  * @test
  27  * @bug      7123767
  28  *
  29  * @summary  Check if a tooltip location in Multi-Monitor
  30  *           configurations is correct.
  31  *           If the configurations number per device exceeds 5,
  32  *           then some 5 random configurations will be checked.
  33  *           Please Use -Dseed=X to set the random generator seed
  34  *           (if necessary).
  35  *
  36  * @author   Vladislav Karnaukhov
  37  *
  38  * @key      headful randomness
  39  *
  40  * @modules  java.desktop/sun.awt
  41  * @library  /test/lib
  42  *
  43  * @run      main/timeout=300 bug7123767
  44  */
  45 
  46 import sun.awt.SunToolkit;
  47 
  48 import javax.swing.*;
  49 import javax.swing.plaf.metal.MetalLookAndFeel;
  50 import java.awt.*;
  51 import java.awt.event.MouseEvent;
  52 import java.lang.reflect.InvocationTargetException;
  53 
  54 public class bug7123767 extends JFrame {
  55 
  56     private static class TestFactory extends PopupFactory {
  57 
  58         private static TestFactory newFactory = new TestFactory();
  59         private static PopupFactory oldFactory;
  60 
  61         private TestFactory() {
  62             super();
  63         }
  64 


< prev index next >