How to determine text fit in JTextArea/JTextPane ?
I am given a fixed size of JTextArea/JTextPane, and I want to know if a text that is wrapped in the text component is able to fit into Text component given a certain font size. That is able to show the whole text without scrolling.
If text is shown requiring scrolling then return true, else false.
What java code can do that ? I want to alter the font size of text so that the auto-wrapped text can fix into the text component without scrolling.
thanx

