private void calcContentRect(){
  Insets contentInsets=getContentBorderInsets(tabPlacement);
  Rectangle bounds=tabPane.getBounds();
  Insets insets=tabPane.getInsets();
  int cx;
  int cy;
  int cw;
  int ch;
switch (tabPlacement) {
case LEFT:
    cx=tabAreaRect.x + tabAreaRect.width + contentInsets.left;
  cy=tabAreaRect.y + contentInsets.top;
cw=bounds.width - insets.left - insets.right- tabAreaRect.width- contentInsets.left- contentInsets.right;
ch=bounds.height - insets.top - insets.bottom- contentInsets.top- contentInsets.bottom;
break;
case RIGHT:
cx=insets.left + contentInsets.left;
cy=insets.top + contentInsets.top;
cw=bounds.width - insets.left - insets.right- tabAreaRect.width- contentInsets.left- contentInsets.right;
ch=bounds.height - insets.top - insets.bottom- contentInsets.top- contentInsets.bottom;
break;
case BOTTOM:
cx=insets.left + contentInsets.left;
cy=insets.top + contentInsets.top;
cw=bounds.width - insets.left - insets.right- contentInsets.left- contentInsets.right;
ch=bounds.height - insets.top - insets.bottom- tabAreaRect.height- contentInsets.top- contentInsets.bottom;
break;
case TOP:
default :
cx=tabAreaRect.x + contentInsets.left;
cy=tabAreaRect.y + tabAreaRect.height + contentInsets.top;
cw=bounds.width - insets.left - insets.right- contentInsets.left- contentInsets.right;
ch=bounds.height - insets.top - insets.bottom- tabAreaRect.height- contentInsets.top- contentInsets.bottom;
}
contentRect.setBounds(cx,cy,cw,ch);
}

private void calcContentRect ( ) { Insets contentInsets = getContentBorderInsets ( tabPlacement ) ; Rectangle bounds = tabPane . getBounds ( ) ; Insets insets = tabPane . getInsets ( ) ; int cx ; int cy ; int cw ; int ch ; switch ( tabPlacement ) { case LEFT : cx = tabAreaRect . x + tabAreaRect . width + contentInsets . left ; cy = tabAreaRect . y + contentInsets . top ; cw = bounds . width - insets . left - insets . right - tabAreaRect . width - contentInsets . left - contentInsets . right ; ch = bounds . height - insets . top - insets . bottom - contentInsets . top - contentInsets . bottom ; break ; case RIGHT : cx = insets . left + contentInsets . left ; cy = insets . top + contentInsets . top ; cw = bounds . width - insets . left - insets . right - tabAreaRect . width - contentInsets . left - contentInsets . right ; ch = bounds . height - insets . top - insets . bottom - contentInsets . top - contentInsets . bottom ; break ; case BOTTOM : cx = insets . left + contentInsets . left ; cy = insets . top + contentInsets . top ; cw = bounds . width - insets . left - insets . right - contentInsets . left - contentInsets . right ; ch = bounds . height - insets . top - insets . bottom - tabAreaRect . height - contentInsets . top - contentInsets . bottom ; break ; case TOP : default : cx = tabAreaRect . x + contentInsets . left ; cy = tabAreaRect . y + tabAreaRect . height + contentInsets . top ; cw = bounds . width - insets . left - insets . right - contentInsets . left - contentInsets . right ; ch = bounds . height - insets . top - insets . bottom - tabAreaRect . height - contentInsets . top - contentInsets . bottom ; } contentRect . setBounds ( cx , cy , cw , ch ) ; }
calculate the bounds rectangle for the content panes .
