< prev index next >

test/java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java

Print this page
rev 14836 : 8159690: [TESTBUG] Mark headful tests with @key headful.
   1 /*
   2  * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   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 import java.awt.Frame;
  25 import javax.swing.JFrame;
  26 import java.awt.GraphicsEnvironment;
  27 import java.awt.Toolkit;
  28 import java.awt.EventQueue;
  29 import java.awt.FlowLayout;
  30 import java.awt.Rectangle;
  31 import java.lang.reflect.InvocationTargetException;
  32 /*
  33  * @test

  34  * @bug 8022302
  35  * @summary Set extendedState Frame.MAXIMIZED_BOTH for undecorated Frame and JFrame.
  36  *          Check if resulted size is equal to GraphicsEnvironment.getMaximumWindowBounds().
  37  *
  38  * @library ../../../../lib/testlibrary
  39  * @build ExtendedRobot
  40  * @run main MaximizedUndecorated
  41  */
  42 
  43 
  44 public class MaximizedUndecorated {
  45     private Frame frame;
  46     private ExtendedRobot robot;
  47     public static void main(String args[]) {
  48         if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
  49             return;
  50         }
  51         MaximizedUndecorated test = new MaximizedUndecorated();
  52         boolean doPass = true;
  53         try{


   1 /*
   2  * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   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 import java.awt.Frame;
  25 import javax.swing.JFrame;
  26 import java.awt.GraphicsEnvironment;
  27 import java.awt.Toolkit;
  28 import java.awt.EventQueue;
  29 import java.awt.FlowLayout;
  30 import java.awt.Rectangle;
  31 import java.lang.reflect.InvocationTargetException;
  32 /*
  33  * @test
  34  * @key headful
  35  * @bug 8022302
  36  * @summary Set extendedState Frame.MAXIMIZED_BOTH for undecorated Frame and JFrame.
  37  *          Check if resulted size is equal to GraphicsEnvironment.getMaximumWindowBounds().
  38  *
  39  * @library ../../../../lib/testlibrary
  40  * @build ExtendedRobot
  41  * @run main MaximizedUndecorated
  42  */
  43 
  44 
  45 public class MaximizedUndecorated {
  46     private Frame frame;
  47     private ExtendedRobot robot;
  48     public static void main(String args[]) {
  49         if (!Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
  50             return;
  51         }
  52         MaximizedUndecorated test = new MaximizedUndecorated();
  53         boolean doPass = true;
  54         try{


< prev index next >