Question

RESOLVED

I've looked around for a while now and I can't seem to figure out how to do this.

I have lots of components within my JFrame and I am able to resize my JFrame. When I resize the JFrame I want the internal components to resize along with the JFrame, but instead they stay exactly where they were when the GUI was first run.

How can I fix this problem? Is there a value I'm not setting somewhere or what?

Edit: Also, I'm not using any layout manager.

getContentPane().setLayout(null);
Was it helpful?

Solution

You state:

Edit: Also, I'm not using any layout manager. getContentPane().setLayout(null);

That's your problem. You should almost never use null layout. It is much easier to use and maintain a gui that uses layout managers in a smart way. Read the layout manager tutorials as they can help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top