int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight();
int max = ((orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight()) - getDividerSize();
  public void setDividerLocation(double proportionalLocation)  {    if (proportionalLocation > 1 || proportionalLocation < 0)      throw new IllegalArgumentException        ("proportion has to be between 0 and 1.");    int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight();    setDividerLocation((int) (proportionalLocation * max));  }