Iterator iter = ((ShellManager)obj).getWindows(); while (iter.hasNext()) { Shell shell = (Shell) iter.next(); if(!shell.getMinimized()) return false; } return true;