Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2005

Tip: Looking for answers? Try searching our database.

GridbagLayout

Thread view: 
ofilha - 25 Mar 2005 16:33 GMT
I am stuck in a small sample program using gridbaglayouts.  In one of
my current program assignments i created some GUI forms with a basic
panel then a couple of subpanels for the fields.  The Top level panel i
made Borderlayout then inserted the other two panels in the north and
center area.  Then within those panels i used gridbag layouts.  It
worked fine, but one of the things i noticed and don't like is that
some of the text fields appear to be way off to the side in relation to
the labels identifying the text field.  So, i started reading up more
on gridbaglayouts and found the borland site where they suggest using
gridbaglayouts for all the panels as opposed to what i was doing.  I
decided to give it a try with a small test program.  What i find now is
that the top level panel appears fine but the other panels show up in
the center.  I know this may be vague, but i am just wondering why a
panel would be placed in the center of another panel when i give it the
x,y coordinates of 0,0.  I would have thought that it would line up on
the top left corner of the toplevel panel.
John McGrath - 28 Mar 2005 02:57 GMT
> I know this may be vague

Indeed.  Consider posting code.

> i am just wondering why a panel would be placed in the center of another
> panel when i give it the x,y coordinates of 0,0.  I would have thought
> that it would line up on the top left corner of the toplevel panel.

Try searching the GridBagLayout JavaDocs for the word "center".

Signature

Regards,

John McGrath



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.