java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1328) at com.sun.glass.ui.Window.ungrabFocus(Window.java:793) at com.sun.javafx.tk.quantum.WindowStage.ungrabFocus(WindowStage.java:759) at javafx.stage.Window.decreaseFocusGrabCounter(Window.java:1060) at javafx.stage.PopupWindow.handleAutohideActivation(PopupWindow.java:899) at javafx.stage.PopupWindow.impl_visibleChanged(PopupWindow.java:520) at javafx.stage.Window$9.invalidated(Window.java:802) at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109) at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143) at javafx.stage.Window.setShowing(Window.java:829) at javafx.stage.Window.hide(Window.java:854) at javafx.stage.PopupWindow.hide(PopupWindow.java:457) at javafx.scene.control.ContextMenu.hide(ContextMenu.java:298) at javafx.stage.PopupWindow.doAutoHide(PopupWindow.java:827) at javafx.stage.PopupWindow$PopupEventRedirector.handleFocusUngrabEvent(PopupWindow.java:1024) at javafx.stage.PopupWindow$PopupEventRedirector.handleRedirectedEvent(PopupWindow.java:961) at com.sun.javafx.event.EventRedirector.dispatchCapturingEvent(EventRedirector.java:106) at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52) at com.sun.javafx.event.EventRedirector.redirectEvent(EventRedirector.java:124) at com.sun.javafx.event.EventRedirector.dispatchCapturingEvent(EventRedirector.java:103) at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.event.Event.fireEvent(Event.java:198) at com.sun.javafx.stage.WindowPeerListener.focusUngrab(WindowPeerListener.java:101) at com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:93) at com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:40) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassWindowEventHandler.handleWindowEvent(GlassWindowEventHandler.java:133) at com.sun.glass.ui.Window.handleWindowEvent(Window.java:1251) at com.sun.glass.ui.Window.notifyFocusUngrab(Window.java:1238) at com.sun.glass.ui.mac.MacWindow._setVisible(Native Method) at com.sun.glass.ui.Window.setVisible(Window.java:589) at com.sun.javafx.tk.quantum.WindowStage.setVisible(WindowStage.java:453) at javafx.stage.Window$9.invalidated(Window.java:776) at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109) at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:143) at javafx.stage.Window.setShowing(Window.java:829) at javafx.stage.Window.show(Window.java:844) at javafx.stage.Stage.show(Stage.java:255) at test.openWindow(test.java:69) at test.access$000(test.java:15) at test$2$1.handle(test.java:41) at test$2$1.handle(test.java:37) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.control.MenuItem.fire(MenuItem.java:462) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1308) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$313(ContextMenuContent.java:1261) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$$Lambda$172/2013431956.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.Scene$MouseHandler.process(Scene.java:3669) at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3397) at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1673) at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2406) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348) at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382) at com.sun.glass.ui.View.handleMouseEvent(View.java:553) at com.sun.glass.ui.View.notifyMouse(View.java:925)