File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Are my GridBag observations correct? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Are my GridBag observations correct?" Watch "Are my GridBag observations correct?" New topic
Author

Are my GridBag observations correct?

David Eason
Greenhorn

Joined: Oct 31, 2001
Posts: 14
[OK, I think I am done editing now.]
There is a tutorial at http://pandonia.canberra.edu.au/java/xadvisor/gridbag/gridbag.html I used the applet under the "Anchor" subhead to make some preliminary notes about the use of "fill" and "anchor" in combination. The applet is a little tricky because you have to change fill before anchor takes effect. Here are my notes so far:
<blockquote>
NONE + any anchor = no change in size and anchor honored
HORIZONTAL + NORTH or NORTHEAST or NORTHWEST or CENTER = top of cell, entire width.
HORIZONTAL + SOUTH or SOUTHEAST or SOUTHWEST = bottom of cell, entire width.
HORIZONTAL + EAST or WEST = vertical center of cell, entire width.
VERTICAL + NORTH or SOUTH or CENTER = horizontal center of cell, entire height
VERTICAL + WEST or NORTHWEST or SOUTHWEST = left side of cell, entire height
VERTICAL + EAST or NORTHEAST or SOUTHEAST = right side of cell, entire height
BOTH + anchor = entire height and width, so anchor not relevant
</blockquote>
Does this look about right? It seems to make some logical sense except I don't understand why HORIZONTAL + CENTER would put you at the top of the cell.

[This message has been edited by David Eason (edited November 09, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are my GridBag observations correct?