Search code examples
java-melwuit

What does the getMaxSize really returns about a TextArea?


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 ?


Solution

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