code: public Rectangle getBarcodeSize() {
          float width = ((code.length() + 1) * 5 + 1) * n + x;
          return new Rectangle(width, barHeight);
      }
docs: Gets the maximum area that the barcode and the text, if
  any, will occupy. The lower left corner is always (0, 0).
  @return the size the barcode occupies.