static double showSuggestion_hideTime = 3.0; // action is called in new thread static JLabel showSuggestion_individual(fS suggestionText, fO action) { final int fontSize = 20, buttonFontSize = 15; final JLabel label = fontSize(fontSize, jCenteredMultiLineLabel(suggestionText)); final VF1 framePost = getThreadLocal(makeFrame_post); swing { makeFrame_post.set(or(framePost, vf1_frameAutoRequestFocusFalse())); JFrame f = alwaysOnTop(showPackedFrameInBottomRightCorner( withLineBorder(Color.black, withMargin( centerAndSouth( label, withTopMargin(makeFirstButtonBold(fontSizeAll(buttonFontSize, jcenteredbuttons( "OK", r { hideSuggestion(label); callFInNewThread(action); }, "No", r { hideSuggestion(label) }))))))))); disposeWindowAfter_unlessMouseInIt(f, showSuggestion_hideTime); } ret label; }