private void updateEffectiveDimensions(){
  effectiveWidth=Math.max(0,width - leftBorder - rightBorder);
  effectiveHeight=Math.max(0,height - topBorder - bottomBorder);
}

private void updateEffectiveDimensions ( ) { effectiveWidth = Math . max ( 0 , width - leftBorder - rightBorder ) ; effectiveHeight = Math . max ( 0 , height - topBorder - bottomBorder ) ; }
updates the effective dimensions .
