code: public static void showExceptionDialog(Exception exception, Component parentComponent,
  		String... additionalMessages)
  	{
  		String title = exception.getLocalizedMessage();
  		StringBuilder sb = new StringBuilder();
  		sb.append("<html><body width='650'>");
  		sb.append("<h2>");
  		sb.append(exception.getLocalizedMessage());
  		sb.append("</h2>");
  		sb.append("<p>");
  		sb.append(exception.getMessage());
  		Stream.of(additionalMessages).forEach(am -> sb.append("<p>" + am));
  		String htmlMessage = sb.toString();
  		JOptionPane.showMessageDialog(parentComponent, htmlMessage, title,
  			JOptionPane.ERROR_MESSAGE);
  	}
docs: Show exception dialog.
  
  @param exception
  the exception
  @param parentComponent
  determines the <code>Frame</code> in which the dialog is displayed; if
  <code>null</code>, or if the <code>parentComponent</code> has no
  <code>Frame</code>, a default <code>Frame</code> is used
  @param additionalMessages
  the additional messages