< prev index next >

test/javax/swing/JTextArea/TextViewOOM/TextViewOOM.java

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

This is a backport of fe58d505fffd from jdk9. 228/596 hunks apply without
modifications. 16 hunks required manual rework. The remainder were for files
not present in jdk8u.


  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 import java.awt.EventQueue;
  25 
  26 import javax.swing.JFrame;
  27 import javax.swing.JScrollPane;
  28 import javax.swing.JTextArea;
  29 
  30 /**
  31  * @test

  32  * @bug 8072775
  33  * @run main/othervm -Xmx80m TextViewOOM
  34  */
  35 public class TextViewOOM {
  36 
  37     private static JFrame frame;
  38     private static JTextArea ta;
  39     private static final String STRING = "\uDC00\uD802\uDFFF";
  40     private static final int N = 5000;
  41 
  42     private static void createAndShowGUI() {
  43         frame = new JFrame();
  44         final JScrollPane jScrollPane1 = new JScrollPane();
  45         ta = new JTextArea();
  46 
  47         ta.setEditable(false);
  48         ta.setColumns(20);
  49         ta.setRows(5);
  50         jScrollPane1.setViewportView(ta);
  51         frame.add(ta);




  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 import java.awt.EventQueue;
  25 
  26 import javax.swing.JFrame;
  27 import javax.swing.JScrollPane;
  28 import javax.swing.JTextArea;
  29 
  30 /**
  31  * @test
  32  * @key headful
  33  * @bug 8072775
  34  * @run main/othervm -Xmx80m TextViewOOM
  35  */
  36 public class TextViewOOM {
  37 
  38     private static JFrame frame;
  39     private static JTextArea ta;
  40     private static final String STRING = "\uDC00\uD802\uDFFF";
  41     private static final int N = 5000;
  42 
  43     private static void createAndShowGUI() {
  44         frame = new JFrame();
  45         final JScrollPane jScrollPane1 = new JScrollPane();
  46         ta = new JTextArea();
  47 
  48         ta.setEditable(false);
  49         ta.setColumns(20);
  50         ta.setRows(5);
  51         jScrollPane1.setViewportView(ta);
  52         frame.add(ta);


< prev index next >