code: public void setErrorMessage(String errorMessage) {
          if (errorMessage == null) {
              logger.debug("Resetting the status bar message color to normal");
              messageLabel.setForeground(SystemColor.controlText);
  
              this.errorMessage = null;
              setMessage(message);
          }
          else {
              logger.debug("Setting the status bar messsage color to red");
              messageLabel.setForeground(Color.RED);
  
              logger.debug("Setting status bar error message to \"" + errorMessage + "\"");
              this.errorMessage = errorMessage;
              messageLabel.setText(this.errorMessage);
          }
      }
docs: Sets the error message text to be displayed on the status bar.
  <p>
  Error messages are shown over the standard message, and in a red color.
  
  @param errorMessage
  the error message to be set, if <code>null</code>, the error message is cleared, and the standard
  message is shown again