Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GridBagLayout always centers components ?



roland.fines wrote:
|Everytime I use the GridBagLayout, with a GridBagConstraints, the added
|components always end up in the middle of the panel.How can I get it to
|stick them to one side (Top, right, left, bottom) of the panel and to
|not the center ?

You *did* read the documentation, didn't you? From the GridBagConstraints javadocs:

public int anchor

This field is used when the component is smaller than its display area.
It determines where, within the display area, to place the component.
Possible values are CENTER, NORTH, NORTHEAST, EAST, SOUTHEAST, SOUTH,
SOUTHWEST, WEST, and NORTHWEST. The default value is CENTER.

Glen Fisher
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.