Edited to add: I am using the card layout to switch between different panels, so I am trying to nest a certain layout within this card layout.
Hello,
I am trying to make a GUI that looks something like this:
I basically want a bar along the top that is invariant in size, and then components below that bar that may vary in size and be positioned in a a symmetric manner. In this picture, I have username and password text boxes in the center, and then below those there are buttons for login and registration.
I tried using the GridBagLayout and my issue was that because of the weighty component, the panels of my GUI would get stretched relative to the size of other components and look ridiculous. I tried nesting gridbaglayout pieces and I managed to break it even further.
I tried using a borderlayout panel with gridlayout panels nested inside, and I experienced the stretching behavior again.
I've since deleted my gridbaglayout code(it made me pull my hair out), but I will include my current code and a picture of what it produces (notice how the text boxes stretch).
Lines 60-122 are the important ones
I really don't want to use a "third party" layout, since I'm sure what I want is possible to achieve but I can't figure out how!
Any help would be greatly appreciated in achieving independently sized panels!