public static void showError(final Component parent,final String msg){
  JOptionPane.showMessageDialog(isIconified(parent) ? null : parent,msg,System.getProperty(DEFAULT_WINDOW_TITLE_PROPERTY),JOptionPane.ERROR_MESSAGE);
}

public static void showError ( final Component parent , final String msg ) { JOptionPane . showMessageDialog ( isIconified ( parent ) ? null : parent , msg , System . getProperty ( DEFAULT_WINDOW_TITLE_PROPERTY ) , JOptionPane . ERROR_MESSAGE ) ; }
shows an error message .
