If I have a swing app where I have 3 JPanels inside the content pane. By default, it makes it so that all 3 panels take up 33% of the overall size of the app. I would like to make it so that the first panel takes up a smaller amount of 'real estate' while the other two take up larger. (let's say 20%, 40%, 40%). how do I do that?

I would recommend using the GridBagLayout and then assign weights to each panel.

that's one way.
Another is to play with nested layout managers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.