simply use the following statement:----box.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);---