< prev index next >

test/javax/swing/JTabbedPane/8017284/bug8017284.java

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


  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 import java.awt.BorderLayout;
  24 import java.awt.Toolkit;
  25 import java.awt.Robot;
  26 import javax.swing.JFrame;
  27 import javax.swing.JLabel;
  28 import javax.swing.JTabbedPane;
  29 import javax.swing.SwingUtilities;
  30 import javax.swing.plaf.metal.MetalLookAndFeel;
  31 
  32 /**
  33  * @test

  34  * @bug 8017284
  35  * @author Alexander Scherbatiy
  36  * @summary  Aqua LaF: memory leak when HTML is used for JTabbedPane tab titles
  37  * @run main/othervm/timeout=60 -Xmx128m bug8017284
  38  */
  39 public class bug8017284 {
  40 
  41     private static final int TAB_COUNT = 100;
  42     private static final int ITERATIONS = 100;
  43     private static JFrame frame;
  44     private static JTabbedPane tabbedPane;
  45 
  46     public static void main(String[] args) throws Exception {
  47 
  48         Robot robot = new Robot();
  49         SwingUtilities.invokeAndWait(() -> {
  50             frame = new JFrame();
  51             frame.setSize(500, 500);
  52             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  53 




  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 import java.awt.BorderLayout;
  24 import java.awt.Toolkit;
  25 import java.awt.Robot;
  26 import javax.swing.JFrame;
  27 import javax.swing.JLabel;
  28 import javax.swing.JTabbedPane;
  29 import javax.swing.SwingUtilities;
  30 import javax.swing.plaf.metal.MetalLookAndFeel;
  31 
  32 /**
  33  * @test
  34  * @key headful
  35  * @bug 8017284
  36  * @author Alexander Scherbatiy
  37  * @summary  Aqua LaF: memory leak when HTML is used for JTabbedPane tab titles
  38  * @run main/othervm/timeout=60 -Xmx128m bug8017284
  39  */
  40 public class bug8017284 {
  41 
  42     private static final int TAB_COUNT = 100;
  43     private static final int ITERATIONS = 100;
  44     private static JFrame frame;
  45     private static JTabbedPane tabbedPane;
  46 
  47     public static void main(String[] args) throws Exception {
  48 
  49         Robot robot = new Robot();
  50         SwingUtilities.invokeAndWait(() -> {
  51             frame = new JFrame();
  52             frame.setSize(500, 500);
  53             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  54 


< prev index next >