int (Component component) { int state = Frame.NORMAL; if (component instanceof Frame) { state = ((Frame)component).getExtendedState(); if (SystemInfoRt.isMac) { // workaround: frame.state is not updated by jdk so get it directly from peer ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(component); if (peer instanceof FramePeer) { state = ((FramePeer)peer).getState(); } } } return state; }