aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes GridBag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "GridBag" Watch "GridBag" New topic
Author

GridBag

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi all
Have some doubts about GridBag..
In a Col/Row the total value of weightx/weighty should be 100% or 1.0???What will happen if it is greater than or less than that???
ipadx,ipady are the border arounds the minimum size of the componenet???
Insects are the borders around the allocated area of the component???
Please Explain ..don't point me towords an URL as I have read all of them still not clear
Thanks
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
If some cen help???
Wali
Paul Smiley
Ranch Hand

Joined: Jun 02, 2000
Posts: 244
In a Col/Row the total value of weightx/weighty should be 100% or 1.0???What will happen if it is greater than or less than that???
ipadx,ipady are the border arounds the minimum size of the componenet???
Insects are the borders around the allocated area of the component???

The total of the rows/columns will always be 100% (duh, I know...) If you have columns of weight 5, 3, 1,& 4, you add up all of the numbers to get 13. So column 1 would be the percentage width of column 1 to the total width which is 5/13 or about 38% of the total width. So it doesn't matter if you use .5, .3, .1 & .4 or some other numbers that give you 38%,23%, 7% & 32%, the result should be the same.

INSECTS are those little creatures that run (and fly)around on your food if you don't clean up when you're done eating. INSETS on the other hand are sort of a buffer zone between your component and the other components in a container.
I personally never use ipadx and ipady. I have never seen the need to use both insets and ipad. You can get the same effects using either method in most cases. "Minimum size" of components and GridBagLayout don't play very nice together... (yeah, I know what the book says, but controlling component size is much easier to do strictly with weights and fills than setting minimum and maximum sizes).
 
wood burning stoves
 
subject: GridBag