JTextField maximum characters length without overlapping characters

Viewed 65

What is the maximum length of the string in the text field? We all know that maximum string length is the value of an Integer.MAX_VALUE (2,147,483,647), but that doesn't matter here.

I tried to search on Google and reading Javadoc but nothing appears about that or I'm missing something?

I have the text field for queries. When the length of the string (query) exceeds about 7000 characters, the text becomes unreadable because of the overlapping characters. I have tried also on 2k monitor and there's a threshold at 10k characters, the previous one is 1600x600. I come to the conclusion that is the width size of the text field is a limiting factor in how much it can show without overlapping characters. Is that right or wrong?

I'm trying to find a solution to limit the number of characters in the text field that not cause a character overlapping but not to set a fixed limit of a string length (6000, as I did) but to dynamically define a maximum length of a string in the text field based on some JTextField parameter or text field width or something third.

I hope you understand what is my question here.

0 Answers
Related