I am using several JPanels, which use FlowLayout. If I add several components to, say panelA, and then add panelA to a frame, any components that cannot fit on one line automatically go to the next. However, if I add components to panelA and then add panelA to panelB (a blank panel with FlowLayout), and then panelB to a frame, the components do not wrap around. Instead, the components are centered and the left & right components are off the screen. Is there anyway to fix this?