< prev index next >

test/jdk/javax/swing/reliability/TaskUndJFrameProperties.java

Print this page




  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 javax.swing.*;
  25 import java.awt.*;
  26 
  27 /*
  28  * @test
  29  * @key headful
  30  * @summary Construct a Undecorated JFrame, try to change the properties
  31  *          using setVisible() method.
  32  * @author Aruna Samji
  33  * @library ../../../lib/testlibrary
  34  * @build ExtendedRobot
  35  * @run main TaskUndJFrameProperties
  36  */
  37 
  38 public class TaskUndJFrameProperties extends Task<GUIUndFrame> {
  39 
  40     public static void main (String[] args) throws Exception {
  41         new TaskUndJFrameProperties(GUIUndFrame.class, new ExtendedRobot()).task();
  42     }
  43 
  44     TaskUndJFrameProperties(Class guiClass, ExtendedRobot robot) throws Exception {
  45         super(guiClass, robot);
  46     }
  47 
  48     public void task() throws Exception {
  49         SwingUtilities.invokeAndWait(() -> {
  50             gui.jframe2.setVisible(true);
  51             gui.jframe1.setVisible(true);
  52 
  53             gui.jframe1.getContentPane().removeAll();




  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 javax.swing.*;
  25 import java.awt.*;
  26 
  27 /*
  28  * @test
  29  * @key headful
  30  * @summary Construct a Undecorated JFrame, try to change the properties
  31  *          using setVisible() method.
  32  * @author Aruna Samji
  33  * @library ../../../lib/client
  34  * @build ExtendedRobot
  35  * @run main TaskUndJFrameProperties
  36  */
  37 
  38 public class TaskUndJFrameProperties extends Task<GUIUndFrame> {
  39 
  40     public static void main (String[] args) throws Exception {
  41         new TaskUndJFrameProperties(GUIUndFrame.class, new ExtendedRobot()).task();
  42     }
  43 
  44     TaskUndJFrameProperties(Class guiClass, ExtendedRobot robot) throws Exception {
  45         super(guiClass, robot);
  46     }
  47 
  48     public void task() throws Exception {
  49         SwingUtilities.invokeAndWait(() -> {
  50             gui.jframe2.setVisible(true);
  51             gui.jframe1.setVisible(true);
  52 
  53             gui.jframe1.getContentPane().removeAll();


< prev index next >