Java Swing Dialog Boxes

Created 05 October 2001 00:00
Dialog boxes using the swing set can be created using a combination of the JOptionPane and JDialog classes. For example, to create an error box:
  JOptionPane pane = new JOptionPane(msg, JOptionPane.ERROR_MESSAGE);
  JDialog dialog = pane.createDialog(owner, title); 
  dialog.show();