private void drawHighlightedRegister(final Graphics g) {

    if (!isEnabled()) {
      return;
    }

    if (editedRegister != -1) {

      // Highlight the edited register if applicable.
      g.setColor(bgColorEdit);

      final Rectangle r = getRegisterBounds(editedRegister);
      g.fillRect(r.x, r.y, r.width, r.height);

    } else if (highlightedRegister != -1) {

      // Highlight the highlighted register if applicable.
      g.setColor(bgColorHighlight);

      final Rectangle r = getRegisterBounds(highlightedRegister);
      g.fillRect(r.x, r.y, r.width, r.height);
    }
  }
Draws the background of the highlighted register in a different color than the standard
background.

@param g
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/JRegisterView/JRegisterView.java