FrameState (@NotNull Component component) { for (ComponentListener listener : component.getComponentListeners()) { if (listener instanceof FrameState) { return (FrameState)listener; } } return null; }