private void showMessage(String message,boolean error){
  lblError.setForeground(error ? Color.RED : Color.BLACK);
  lblError.setText(message);
}

private void showMessage ( String message , boolean error ) { lblError . setForeground ( error ? Color . RED : Color . BLACK ) ; lblError . setText ( message ) ; }
show message , set text colour according to whether message is informational ( black ) or an error ( red ) .
