Use a JOptionPane bean to provide a simple dialog for an input prompt, a message, or user confirmation. The dialog is modal, so the thread is held until the user dismisses the dialog.
You should not use a JOptionPane bean with AWT components. Although Swing and AWT beans can be mixed, it is inadvisable.
Adding a Pane or Panel
Pane and Panel Beans
Beans for Visual Composition