jdk/test/javax/swing/JInternalFrame/8145896/TestJInternalFrameMaximize.java
author rchamyal
Fri, 11 Mar 2016 10:57:47 +0530
changeset 36868 9d0d667bff5c
child 38994 a6b14a17689b
permissions -rw-r--r--
8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception Reviewed-by: serb, alexsch
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36868
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     1
/*
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     2
 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     4
 *
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     8
 *
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    13
 * accompanied this code).
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    14
 *
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    18
 *
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    21
 * questions.
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    22
 */
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    23
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    24
/*
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    25
 * @test
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    26
 * @bug 8145896
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    27
 * @summary JInternalFrame setMaximum before adding to desktop throws null pointer exception
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    28
 * @library ../../regtesthelpers
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    29
 * @build Util
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    30
 * @run main TestJInternalFrameMaximize
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    31
 */
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    32
import java.awt.Point;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    33
import java.awt.Robot;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    34
import java.awt.event.ActionEvent;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    35
import java.awt.event.InputEvent;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    36
import java.beans.PropertyVetoException;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    37
import javax.swing.JFrame;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    38
import javax.swing.JDesktopPane;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    39
import javax.swing.JMenu;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    40
import javax.swing.JMenuBar;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    41
import javax.swing.JMenuItem;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    42
import javax.swing.JInternalFrame;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    43
import javax.swing.SwingUtilities;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    44
import javax.swing.UIManager;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    45
import javax.swing.UnsupportedLookAndFeelException;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    46
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    47
public class TestJInternalFrameMaximize {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    48
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    49
    private static JDesktopPane desktopPane;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    50
    private static JFrame frame;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    51
    private static int count = 0;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    52
    private static JMenu menu;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    53
    private static JMenuBar menuBar;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    54
    private static JMenuItem menuItem;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    55
    private static Robot robot;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    56
    private static volatile String errorMessage = "";
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    57
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    58
    public static void main(String[] args) throws Exception {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    59
        robot = new Robot();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    60
        UIManager.LookAndFeelInfo[] lookAndFeelArray
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    61
                = UIManager.getInstalledLookAndFeels();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    62
        for (UIManager.LookAndFeelInfo lookAndFeelItem : lookAndFeelArray) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    63
            String lookAndFeelString = lookAndFeelItem.getClassName();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    64
            if (tryLookAndFeel(lookAndFeelString)) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    65
                createUI();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    66
                robot.waitForIdle();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    67
                executeTest();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    68
            }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    69
        }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    70
        if (!"".equals(errorMessage)) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    71
            throw new RuntimeException(errorMessage);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    72
        }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    73
    }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    74
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    75
    private static boolean tryLookAndFeel(String lookAndFeelString) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    76
        try {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    77
            UIManager.setLookAndFeel(lookAndFeelString);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    78
            return true;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    79
        } catch (UnsupportedLookAndFeelException | ClassNotFoundException |
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    80
                InstantiationException | IllegalAccessException e) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    81
            errorMessage += e.getMessage() + "\n";
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    82
            System.err.println("Caught Exception: " + e.getMessage());
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    83
            return false;
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    84
        }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    85
    }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    86
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    87
    private static void createUI() throws Exception {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    88
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    89
        SwingUtilities.invokeAndWait(() -> {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    90
            frame = new JFrame("Test Frame");
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    91
            desktopPane = new JDesktopPane();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    92
            frame.getContentPane().add(desktopPane);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    93
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    94
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    95
            menuBar = new JMenuBar();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    96
            frame.setJMenuBar(menuBar);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    97
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    98
            menu = new JMenu("File");
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
    99
            menuBar.add(menu);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   100
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   101
            menuItem = new JMenuItem("New Child");
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   102
            menuItem.addActionListener((ActionEvent e) -> {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   103
                try {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   104
                    JInternalFrame f = new JInternalFrame("Child "
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   105
                            + (++count), true, true, true, true);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   106
                    f.setSize(200, 300);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   107
                    f.setLocation(count * 20, count * 20);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   108
                    f.setMaximum(true);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   109
                    desktopPane.add(f);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   110
                    f.setVisible(true);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   111
                } catch (PropertyVetoException ex) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   112
                } catch (RuntimeException ex) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   113
                    errorMessage = "Test Failed";
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   114
                } finally {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   115
                    frame.dispose();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   116
                }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   117
            });
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   118
            menu.add(menuItem);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   119
            frame.setSize(500, 500);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   120
            frame.setLocationRelativeTo(null);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   121
            frame.setVisible(true);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   122
        });
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   123
    }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   124
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   125
    private static void executeTest() throws Exception {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   126
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   127
        Point point = Util.getCenterPoint(menu);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   128
        performMouseOperations(point);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   129
        point = Util.getCenterPoint(menuItem);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   130
        performMouseOperations(point);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   131
    }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   132
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   133
    private static void performMouseOperations(Point point) {
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   134
        robot.mouseMove(point.x, point.y);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   135
        robot.mousePress(InputEvent.BUTTON1_MASK);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   136
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   137
        robot.delay(1000);
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   138
        robot.waitForIdle();
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   139
    }
9d0d667bff5c 8145896: JInternalFrame setMaximum before adding to desktop throws null pointer exception
rchamyal
parents:
diff changeset
   140
}