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: Use of LayoutStyle.INDENT in GroupLayout



Paul Taylor wrote:
Hi, has anybody used this. I'm trying to create a JPanel whereby there is a label and then below it indented slightly a couple of input fields. This pattern is repeated for a number of labels and associated input fields. The end of the all the labels , and the start of the text fields should be aligned with each other horizontally. It seems that the INDENT type would be useful for this but I cant get it to work. Actually I don't understand how to use it, the RELATED and UNRELATED types can be used to put gaps between components within a sequential group but in the case of indentation this doesn't apply as the two groups are not layed out sequentially after one another. I've looked at Netbeans Matisse but this just does indentation using hardcoded gaps which is not the way I want to go.

thanks paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Actually I've reread the Javadocs for LayoutStyle.addPreferredGap() and whilst some of the methods just say

|type| - the type of gap; one of the constants defined by LayoutStyle
| java.lang.IllegalArgumentException| - if |type| is not a valid LayoutStyle constant


some say
|type| - the type of gap; one of LayoutStyle.RELATED or LayoutStyle.UNRELATED



Im wondering if the javadoc is wrong and if INDENT is just used by LayoutStyle.getPreferredGap() to provide the value for the indent, which you then have to incorporate into your layout manually...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden
References: 
 >Use of LayoutStyle.INDENT in GroupLayout (From: Paul Taylor <email@hidden>)



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.