Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-16-2008, 06:40 PM
Member
 
Join Date: Jan 2008
Posts: 16
newtojava7 is on a distinguished road
GridBagLayout...please help
Hello, I'm curious as to how to set the number of rows and columns using the GridBagLayout so I can set my components in the appropriate place. Right now I've created a label and it is appearing right smack in the middle, leading me to believe the default is a 1 row 1 column set up, I may be wrong. How can I change the number of rows and columns and manipulate their sizes?

Thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-17-2008, 03:16 AM
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
How can I change the number of rows and columns and manipulate their sizes?
GridBagLayout determines the number of columns and rows from the number of components you give it to layout and the constraints of the components. If you
add four buttons with the default constraints it will try to lay them out in a single row of four columns. If you specify the gridwidth constraint as GridBagConstraints.REMAINDER for all the buttons it will try to lay them out in four rows and a single column. The weight constraints allow the component display areas to occupy extra space and/or to be anchored in different locations within their display area. See the GridBagLayout class api for details.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridBagLayout newtojava7 New To Java 2 03-07-2008 02:16 AM
Problems with gridBaglayout when I resize the window Iyengar AWT / Swing 1 02-17-2008 01:43 AM
Need a idea on GridBagLayout ddsuresh AWT / Swing 1 01-29-2008 03:32 AM
gridbaglayout newtojava7 New To Java 4 01-27-2008 10:03 PM
Problem with GridBagLayout Daniel SWT / JFace 2 07-01-2007 08:57 PM


All times are GMT +3. The time now is 11:45 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org