changeButtonOrientation(); positionButtons();
Insets insets = getInsets(); if (orientation == JSplitPane.HORIZONTAL_SPLIT) { int size = getWidth() - insets.left - insets.right; size = Math.max(size, 0); size = Math.min(size, ONE_TOUCH_SIZE); int x, y; if (centerOneTouchButtons) { y = insets.top; x = (getWidth() - size) / 2; } else { x = insets.left; y = 0; }  leftButton.setBounds(x, y + ONE_TOUCH_OFFSET, size, size * 2); rightButton.setBounds(x, y + ONE_TOUCH_OFFSET + ONE_TOUCH_SIZE * 2, size, size * 2); } else { int size = getHeight() - insets.top - insets.bottom; size = Math.max(size, 0); size = Math.min(size, ONE_TOUCH_SIZE); int x, y; if (centerOneTouchButtons) { x = insets.left; y = (getHeight() - size) / 2; } else { x = 0; y = insets.top; } leftButton.setBounds(x + ONE_TOUCH_OFFSET, y, size * 2, size); rightButton.setBounds(x + ONE_TOUCH_OFFSET + ONE_TOUCH_SIZE * 2, y, size * 2, size); } } else {   leftButton.setBounds(-5, -5, 1, 1); rightButton.setBounds(-5, -5, 1, 1); }
    public void layoutContainer(Container c)    {      if (splitPane.isOneTouchExpandable())        {	  changeButtonOrientation();	  positionButtons();        }    }