Java – how to get the number of characters in jtextarea?
•
Java
I have a jtextarea. I need to convert the character of each field to another character
So I thought of a simple cycle:
for(int i = 0; i <= t.length(); i++) { ... }
But the length () function is not appropriate. I can't find one
If someone has encountered this problem, I will help it
Solution
If you need the string content of the jtextarea field, just use textarea Gettext (), and then use the string as usual, for example, to get its length ()
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码