< prev index next >

test/javax/swing/text/html/7189299/bug7189299.java

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


  22  */
  23 
  24 /*
  25  * Portions Copyright (c) 2013 IBM Corporation
  26  */
  27 import java.awt.BorderLayout;
  28 import java.awt.Robot;
  29 
  30 import java.awt.event.ActionListener;
  31 import javax.swing.DefaultButtonModel;
  32 import javax.swing.JEditorPane;
  33 import javax.swing.JFrame;
  34 import javax.swing.SwingUtilities;
  35 import javax.swing.text.StyleConstants;
  36 import javax.swing.text.StyleContext;
  37 import javax.swing.text.html.HTMLEditorKit;
  38 
  39 
  40 /*
  41  * @test

  42  * @bug 8008289
  43  * @summary Shared ButtonModel instance should deregister previous listeners.
  44  * @author Frank Ding
  45  */
  46 public class bug7189299 {
  47 
  48     private static JEditorPane html;
  49     private static JFrame frame;
  50 
  51     private static void setup() {
  52         /**
  53          * Note the input type is not restricted to "submit". Types "image",
  54          * "checkbox", "radio" have the same problem.
  55          */
  56         html = new JEditorPane("text/html",
  57                 "<html><body><form action=\"http://localhost.cgi\">"
  58                         + "<input type=submit name=submit value=\"submit\"/>"
  59                         + "</form></body></html>");
  60         frame = new JFrame();
  61         frame.setLayout(new BorderLayout());




  22  */
  23 
  24 /*
  25  * Portions Copyright (c) 2013 IBM Corporation
  26  */
  27 import java.awt.BorderLayout;
  28 import java.awt.Robot;
  29 
  30 import java.awt.event.ActionListener;
  31 import javax.swing.DefaultButtonModel;
  32 import javax.swing.JEditorPane;
  33 import javax.swing.JFrame;
  34 import javax.swing.SwingUtilities;
  35 import javax.swing.text.StyleConstants;
  36 import javax.swing.text.StyleContext;
  37 import javax.swing.text.html.HTMLEditorKit;
  38 
  39 
  40 /*
  41  * @test
  42  * @key headful
  43  * @bug 8008289
  44  * @summary Shared ButtonModel instance should deregister previous listeners.
  45  * @author Frank Ding
  46  */
  47 public class bug7189299 {
  48 
  49     private static JEditorPane html;
  50     private static JFrame frame;
  51 
  52     private static void setup() {
  53         /**
  54          * Note the input type is not restricted to "submit". Types "image",
  55          * "checkbox", "radio" have the same problem.
  56          */
  57         html = new JEditorPane("text/html",
  58                 "<html><body><form action=\"http://localhost.cgi\">"
  59                         + "<input type=submit name=submit value=\"submit\"/>"
  60                         + "</form></body></html>");
  61         frame = new JFrame();
  62         frame.setLayout(new BorderLayout());


< prev index next >