Swing problem with layout and several panels

E

Eva

Hello, I have a problem that is making me mad.
I have an application with a menubar that lets me change the JPanel to
show.
This panels are using gridBagLayout to localize and resize their
graphical components.
When I have five created panels to show all is rigth. If the number of
panels is greater (so number of graphical components grow) and I use
the menubar to see one of my panels, the layout redistribute the
components without sense.
It resizes the components , localizes them with greater y positions
.....

I have tryed with another layout manager (BorderLayout and FlowLayout)
but the result is the same.
I have tryed to set preferred , minimum and maximum size attributes of
components but the result is the same.
....
Is there no way to lock a layout?

Is there anyone with the same problem? Please I need some clue.
Thanks in advanced.
Eva
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top