Displaying Custom Dialogs
You can display your own user interface components using the
JOptionPane
class. The following example shows the
definition of a custom Action
class that displays
an information message:
private class MyCustomAction extends AbstractAction { public MyCustomAction(final String name, final Icon icon) { // give a name and icon to your action } @Override public void actionPerformed(final ActionEvent e) { JOptionPane.showMessageDialog(null, "Message from studio plugin", "Plugin dialog", JOptionPane.INFORMATION_MESSAGE ); } }
You can, of course display much more sophisticated user interface
components using JOptionPane
. For further
information about JOptionPane and about Swing in general, see:
http://docs.oracle.com/javase/8/docs/api/javax/swing/JOptionPane.html https://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html