JBPopup (Runnable onDispose) { JBPopup popup = createValueEditorPopup(myTarget, myValue.get(), onDispose, getDataContext(), o -> { myValue.set(o); updateText(presentation); }, myValue::commit); popup.setMinimumSize(new Dimension(getMinWidth(), getMinHeight())); return popup; }