| Why the Button's moving while editing text in a TextArea ?
|
[quoted text clipped - 6 lines]
| }
| }
I have not used BoxLayout before,
but I suspect it is because..
"Similarly, for a vertical layout, BoxLayout
attempts to make all components in the column
as wide as the widest component. If that fails,
it aligns them horizontally according to their X
alignments."
As the JTextArea grows, the layout grows
and the JButton remains centered within it..
Have you considered using other layouts?
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
W. - 20 Jan 2004 09:30 GMT
> | Why the Button's moving while editing text in a TextArea ?
> |
[quoted text clipped - 6 lines]
> | }
> | }
> As the JTextArea grows, the layout grows
> and the JButton remains centered within it..
But, typing text in JTextArea does't change
its size, X alignment, does it?
> Have you considered using other layouts?
I know I can stop it but was just testing the BoxLayout
and it came with something like that.

Signature
Regards,
W.
> Why the Button's moving while editing text in a TextArea ?
>
[quoted text clipped - 6 lines]
> }
> }
Because its not in a JScrollPane.
cp.add(new JScrollPane(new JTextArea(10,10)));
Greg