//static double showYesToAcceptPopup_hideAfter = 10.0; sS showYesToAcceptPopup_imageID = #1101458; // #1101459 for "ok" instead of "yes" (wit.ai is bad at recognizing "yes") static YesPopup showYesToAcceptPopup(final Component c) { ret showYesToAcceptPopup(c, showYesToAcceptPopup_imageID); } static YesPopup showYesToAcceptPopup(final Component c, fS imageID) { ret swing(func -> YesPopup { final JDesktopPane desktop = parentOfType(c, JDesktopPane.class); if (desktop == null) null; final YesPopup popup = setSizeToPreferredSize(YesPopup(c, imageID, 114)); Runnable moveIt = r { Rect r = boundsInParent(c, desktop); setLocation(popup, r.x+r.w/2, r.y-popup.getHeight()-5); }; desktop.add(popup, JLayeredPane.POPUP_LAYER); onClick(popup, r { removeFromParent(popup) }); callF(moveIt); awtEvery(popup, 100, moveIt); //removeFromParentAfter(showYesToAcceptPopup_hideAfter, popup); ret popup; }); }