< prev index next >

test/javax/swing/JRadioButton/8041561/bug8041561.java

Print this page
rev 14989 : 8160974: [TESTBUG] Mark more headful tests with @key headful.


  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 import java.awt.AWTException;
  25 import java.awt.Color;
  26 import java.awt.Point;
  27 import java.awt.Robot;
  28 import javax.swing.JFrame;
  29 import javax.swing.JPanel;
  30 import javax.swing.JRadioButton;
  31 import javax.swing.SwingUtilities;
  32 import javax.swing.UIManager;
  33 import javax.swing.UnsupportedLookAndFeelException;
  34 import javax.swing.plaf.metal.DefaultMetalTheme;
  35 import javax.swing.plaf.metal.MetalLookAndFeel;
  36 
  37 /**
  38  * @test

  39  * @bug 8041561
  40  * @author Alexander Scherbatiy
  41  * @summary Inconsistent opacity behaviour between JCheckBox and JRadioButton
  42  * @run main bug8041561
  43  */
  44 public class bug8041561 {
  45 
  46     private static JRadioButton radioButton;
  47 
  48     public static void main(String[] args) throws Exception {
  49         SwingUtilities.invokeAndWait(new Runnable() {
  50 
  51             @Override
  52             public void run() {
  53                 try {
  54                     MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
  55                     UIManager.setLookAndFeel(new MetalLookAndFeel());
  56                     createAndShowGUI();
  57                 } catch (UnsupportedLookAndFeelException e) {
  58                     throw new RuntimeException(e);




  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 import java.awt.AWTException;
  25 import java.awt.Color;
  26 import java.awt.Point;
  27 import java.awt.Robot;
  28 import javax.swing.JFrame;
  29 import javax.swing.JPanel;
  30 import javax.swing.JRadioButton;
  31 import javax.swing.SwingUtilities;
  32 import javax.swing.UIManager;
  33 import javax.swing.UnsupportedLookAndFeelException;
  34 import javax.swing.plaf.metal.DefaultMetalTheme;
  35 import javax.swing.plaf.metal.MetalLookAndFeel;
  36 
  37 /**
  38  * @test
  39  * @key headful
  40  * @bug 8041561
  41  * @author Alexander Scherbatiy
  42  * @summary Inconsistent opacity behaviour between JCheckBox and JRadioButton
  43  * @run main bug8041561
  44  */
  45 public class bug8041561 {
  46 
  47     private static JRadioButton radioButton;
  48 
  49     public static void main(String[] args) throws Exception {
  50         SwingUtilities.invokeAndWait(new Runnable() {
  51 
  52             @Override
  53             public void run() {
  54                 try {
  55                     MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
  56                     UIManager.setLookAndFeel(new MetalLookAndFeel());
  57                     createAndShowGUI();
  58                 } catch (UnsupportedLookAndFeelException e) {
  59                     throw new RuntimeException(e);


< prev index next >