code: private static void showError(Component parent, String title, String msg) {
      JOptionPane.showMessageDialog(parent, msg, title, JOptionPane.ERROR_MESSAGE);
    }
docs: Helper method to show a error message as "popup". Calls
  {@link JOptionPane#showMessageDialog(java.awt.Component, Object)}.
  
  @param parent The parent component for the popup.
  @param msg The message to be displayed.