| Author |
Grid layout
|
Gautam Sewani
Ranch Hand
Joined: Apr 19, 2002
Posts: 93
|
|
In this code,a layout manager of 3 rows and 1 column is created and 5 buttons are added to it. When I run this application,I find 3 buttons in the first row,and 2 buttons in the second with the space for a third button left.Now I understand why this happens,its because GridLayoutManager is row major and it has to strictly adhere to the number of rows specified,unless it is 0.But couldn't it have placed four buttons in the top row and 1 in the 2nd row.How will we determine how many buttons are placed in the top row and how many in the bottom row?
|
 |
Jamal Hasanov
Ranch Hand
Joined: Jan 08, 2002
Posts: 411
|
|
Hi, Gautam I think, this link may help you Layout Managers P.S. I studied LayoutManagers from this site during my SCJP prep. Regards, Jamal Hasanov www.j-think.com
|
 |
Arun Pai
Ranch Hand
Joined: Mar 11, 2002
Posts: 143
|
|
Gautam, Your last chance don't forget to check javacertstudy in yahoo groups(Treasure is not hidden - open source code in messages section). Good Luck for your Exams Tomorrow. -Arun
|
 |
 |
|
|
subject: Grid layout
|
|
|