コード例 #1
0
 /**
  * Closes the given <code>{@link JInternalFrame}</code>.
  *
  * @param internalFrame the target <code>JInternalFrame</code>.
  * @throws IllegalStateException if the <code>JInternalFrame</code> is not showing on the screen.
  * @throws IllegalStateException if the <code>JInternalFrame</code> is not closable.
  */
 @RunsInEDT
 public void close(JInternalFrame internalFrame) {
   Pair<Boolean, Point> closeInfo = validateAndFindCloseInfo(internalFrame);
   if (closeInfo.i) return; // internal frame is already closed
   moveMouseIgnoringAnyError(internalFrame, closeInfo.ii);
   JInternalFrameCloseTask.close(internalFrame);
   robot.waitForIdle();
 }