boolean (JDialog dialog) { JRootPane rootPane = dialog != null && dialog.isResizable() ? dialog.getRootPane() : null; if (rootPane == null) return false; return !ScreenUtil.getScreenRectangle(dialog).equals(dialog.getBounds()); }