File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Grid Layout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Grid Layout

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
this is a question on gidlayout.
There is a gridlayout (2,2). all the four grids are filled up. if i add a new componenent which row will/column it occupy?
Joe
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Column 2, row 2. However some of the other buttons will be repositioned:
Button 1: row 1 col 1
Button 2: row 1 col 2
Button 3: row 1 col 3
Button 4: row 2 col 1
Button 5: row 2 col 2
Whenever both number of columns and number of rows are set by the constructor, the number of columns is actually completely ignored, and instread is determined by how many componenets are added. You can read about it here.

"I'm not back." - Bill Harding, Twister
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
And please don't post the same question twice in two identical threads, as it's a waste of time to answer the question in one thread when it's already been answered in the other.
 
 
subject: Grid Layout
 
Similar Threads
data access in grid
jQuery in Action: grids limitations?
Ajax and Php : appeal
Whats next from SUN, any New Certifications Coming up for JAVA?
Size of JScrollPane in a JPanel