> Hi.
>
[quoted text clipped - 10 lines]
>
> Thank you. Franco.
Thank you. I solved my problem but it was necessary to change the two
statement you suggest in:
getContentPane().setLayout(new BorderLayout());
getContentPane().add(statusBar, BorderLayout.SOUTH);
In that way it worked but any other component disappears from the
frame, so I create a Panel (jPanel1) in the NORTH part of the frame,
and I put all other components in this Panel; after II add this other
statement:
getContentPane().add(jPanel1, BorderLayout.CENTER);
Now when at run time I resize the frame, the statusbar remain always at
the bottom of the frame, jPanel1 expand itself in all the rest of the
space of the frame and the other components ar alway visible in the
location where I have put them.
Please, can you confirm that this is the way to work with Layouts to
solve all this kind of problems?
I am a beginner in Java (I worked until now in Delphi) so I need to
understant this different architecture.
Tank you again. Franco.
zero - 29 Oct 2005 19:31 GMT
ffellico@inwind.it wrote in news:1130609809.723572.190310
@g43g2000cwa.googlegroups.com:
> Thank you. I solved my problem but it was necessary to change the two
> statement you suggest in:
[quoted text clipped - 21 lines]
>
> Tank you again. Franco.
Yep that's exactly how it's done. The JPanel can itself have any layout
you want, creating increasingly complex GUIs. Have a look at the other
layout managers, and pick whatever is best for each specific situation.
For a good introduction in Swing layout managers I suggest the excellent
java swing tutorial, see the links in my previous post.