public static Rectangle getInteriorRectangle ( Component c , Border b , int x , int y , int width , int height ) { final Insets insets ; if ( b != null ) { insets = b . getBorderInsets ( c ) ; } else { insets = new Insets ( 0 , 0 , 0 , 0 ) ; } return new Rectangle ( x + insets . left , // y + insets . top , // width - insets . right - insets . left , // height - insets . top - insets . bottom ) ; }
Gets the interior rectangle .