1

The TextArea class has a method called getMaxSize() which returns an int value. I do not understand what does it really express ? Is it the width ( columns ) or the height ( rows ) or something else ?

There is also the setMaxSize(int maxSize) method.

So what does the size mean when working with TextArea ?

bharath
  • 14,283
  • 16
  • 57
  • 95

2 Answers2

1

I think that the size attribute in TextArea means the number of characters that you can be placed within this component. I think the same is true for the TextField.

Mun0n
  • 4,438
  • 4
  • 28
  • 46
1

setMaxSize for set the maximum size of the TextArea. If you pass 20 means only 20 characters allow on the TextArea. And getMaxSize returns the maximum size of TextArea. That means its return 20. Don't confuse with column or row or somethings else. For more info, look at TextArea javadoc.

bharath
  • 14,283
  • 16
  • 57
  • 95