I am adding more than one panel to a Frame and they are not automatically spacing out. I have a layout manager for each panel. Do I need one for the Frame as well?
The frame is 600X240 and each panel is 200X200. I need the three panels to space out perfectly. How do I force the frame to add one then add the second one where the first ends etc.?
EDIT**
I added this line of code to my frame’s constructor:
setLayout(new GridLayout(1,3));
and it now works perfectly.
I believed LayoutManagers to be specific to JPanels, but now I realize they are used for all components. I added an edit to the OP showing that I did just this. Thanks!