Re: How to implement tab order?
- From: Roedy Green <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 19:03:59 GMT
On Sat, 29 Apr 2006 16:31:41 +0100, Thomas Hawtin
<usenet@xxxxxxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone
who said :
I have to strongly disagree with you. It does depends upon the layout
and how the code is structured, but looking at most straightforward code
keeping constraint builders avoids copy & paste repetition and is easier
to read.
I played around twith various ways of doing it and settled on this
style which has the disadvantage of long lines, but the advantage you
can compare components by looking down a column. Then of course I
discovered IntelliJ reformats it to destroy the columns.
Imagine this stretched out in a line, aligned in columns.
// x y w h wtx wty anchor fill T L B R padx pady
this.add( titleLabel,
new GridBagConstraints( 0,
0,
2,
1,
0.0,
0.0,
GridBagConstraints.WEST,
GridBagConstraints.NONE,
new Insets( 5, 5, 0, 5 ),
0,
0 ) );
// x y w h wtx wty anchor fill T L B R padx pady
this.add( about,
new GridBagConstraints( 2,
0,
1,
1,
0.0,
0.0,
GridBagConstraints.EAST,
GridBagConstraints.NONE,
new Insets( 5, 5, 0, 5 ),
10,
2 ) );
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.
- Follow-Ups:
- Re: How to implement tab order?
- From: IchBin
- Re: How to implement tab order?
- References:
- [Swing] How to implement tab order?
- From: Christian Hauser
- Re: [Swing] How to implement tab order?
- From: Brandon McCombs
- Re: How to implement tab order?
- From: decalod85
- Re: How to implement tab order?
- From: Thomas Hawtin
- [Swing] How to implement tab order?
- Prev by Date: Re: How to implement tab order?
- Next by Date: Re: JTextPane - get location of selected text
- Previous by thread: Re: How to implement tab order?
- Next by thread: Re: How to implement tab order?
- Index(es):