Your description is not very clear. The following is my slightly modified version of your code to make the layout of components more obvious, and I also rectified the setting of component sizes.

...