question: private void resetShapeBounds ( ) { RoundRectangle2D . Double rrect = ( RoundRectangle2D . Double ) shape ; rrect . setRoundRect ( 0 , 0 , getBounds ( ) . width - 1 , getBounds ( ) . height - 1 , 10 , 10 ) ; }
target:  Rests the boundaries of the shape which is drawn as the rubberband. The boundaries of the shape need to be set so that when drawn they lie just inside the boundaries of the component on all four sides.