int divLoc = splitPane.getDividerLocation(); int valLoc = validLocation(divLoc); if (divLoc != valLoc) splitPane.setDividerLocation(valLoc);
  public void paint(Graphics g, JComponent jc)  {    // Do nothing. All the painting is handled by children.  }