upperBottomPanel = new ImagePanel(img);
upperBottomPanel.setLayout(null); When you add components to a container the parent components (container) layout manager asks each of the children for their size requirements and makes arrangements to show each component according to its needs. Some layout managers practically ignore the size requirements of the child components, eg, GridLayout. Some layout managers pay special attention to the preferred size of the child components and attempt to show them at this size. Other layout managers fall in between these extremes. All is documented in the class api for the layout managers and in the tutorial pages on layout managers.
When you specify null for a layout manager then you must supply the layout information to the parent container so it knows what to do with the children you have added to it. We do this with setBounds and setLocation. After realization setSize also works.
The preferredSize is useful for layout managers that honor it in Swing and in j2se 1.5+ in the AWT.
Your choices are to either use one or a combiation of layout managers, or to specify bounds for each of the components that you want shown in containers with null layout managers.
To learn about layout managers see
Lesson: Laying Out Components Within a Container.