Re: How to implement tab order?



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.
.