Object message, String title, int messageType, Icon icon)
Object message)
  public static void showMessageDialog(Component parentComponent,                                       Object message, String title,                                       int messageType, Icon icon)  {    JOptionPane pane = new JOptionPane(message, messageType);    pane.setIcon(icon);    JDialog dialog = pane.createDialog(parentComponent, title);    dialog.pack();    dialog.show();  }