The reason all components are right aligned is that you reset the layout of the JFrame
to FlowLayout.RIGHT
here:
FlowLayout three = new FlowLayout(FlowLayout.RIGHT);
setLayout(three);
This supercedes the earlier call to center align components.