Re: How to implement tab order?



Roedy Green wrote:
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 ) );


Yes Roedy, I have a tendency to code this way also. It is much clearer to me when scanning code. It just happens to be coding practice I was trained to use for mainframe assembly and Macro CICS in the days of yore.

--

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
.