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.
Adding a pane or panel
Sun's JOptionPane bean documentation
Pane and panel beans
Beans for visual composition