Why does a JTextArea resize larger than another?

A

Ahmed Moustafa

Hi All,

I have two JTextArea components in a JFrame, if I type text in one of
them till the scroll bar shows and maximize the window and then restore,
the JTextArea with scroll bar resizes larger than the other textarea
(with the less text in it).

What is this behavior happening? Can I control the resize of the textareas?

Thanks in advance!
 
A

Andrew Thompson

I have two JTextArea components in a JFrame,
...
if I type text in one of
them till the scroll bar shows and maximize the window and then restore,
the JTextArea with scroll bar resizes larger than the other textarea
(with the less text in it).

What is this behavior happening?

I do not know that what depend on the
code you wrote but did not supply.
..Can I control the resize of the textareas?

You can lock them in to a logical size for the UI, Yes.
Thanks in advance!

You're welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top