refine BoundBox of java