Component left = splitPane.getLeftComponent(); Component right = splitPane.getRightComponent();
    public void propertyChange(PropertyChangeEvent e)    {      if (e.getPropertyName().equals(JSplitPane.DIVIDER_SIZE_PROPERTY))        {	  int newSize = splitPane.getDividerSize();	  int[] tmpSizes = layoutManager.getSizes();	  dividerSize = tmpSizes[2];	  Component left = splitPane.getLeftComponent();	  Component right = splitPane.getRightComponent();	  int newSpace = newSize - tmpSizes[2];	  tmpSizes[2] = newSize;	  tmpSizes[0] += newSpace / 2;	  tmpSizes[1] += newSpace / 2;	  layoutManager.setSizes(tmpSizes);        }      else if (e.getPropertyName().equals(JSplitPane.ORIENTATION_PROPERTY))        {	  int max = layoutManager.getAvailableSize(splitPane.getSize(),	                                           splitPane.getInsets());	  int dividerLoc = getDividerLocation(splitPane);	  double prop = ((double) dividerLoc) / max;	  resetLayoutManager();	  if (prop <= 1 && prop >= 0)	    splitPane.setDividerLocation(prop);        }      layoutManager.layoutContainer(splitPane);      splitPane.repaint();      // Don't have to deal with continuous_layout - only      // necessary in dragging modes (and it's checked      // every time you drag there)      // Don't have to deal with resize_weight (as there      // will be no extra space associated with this      // event - the changes to the weighting will      // be taken into account the next time the       // sizes change.)      // Don't have to deal with divider_location       // The method in JSplitPane calls our setDividerLocation      // so we'll know about those anyway.      // Don't have to deal with last_divider_location      // Although I'm not sure why, it doesn't seem to       // have any effect on Sun's JSplitPane.      // one_touch_expandable changes are dealt with      // by our divider.    }