What is the best way to popup a window in IDEA from plugin
If I want to open a Dialog with some components inside for the user to select, is there a recommended example/way or do I just use standard Swing dialogs/JFrame classes?
MArkee
Please sign in to leave a comment.
Hello mark,
You should use the DialogWrapper base class for your dialog. You can find
many examples of its usage in different third-party plugins.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks. Thats very helpful.
if you need a less weighted popup you may consider using
ComponentPopupBuilder popupBuilder = JBPopupFactory.getInstance().createComponentPopupBuilder();
JBPopup popup = popupBuilder.createPopup();
You can specify the main component to be rendered in the center of the popup and as well the component to be focused.