Skip to content
Advertisement

Tag: jtextarea

How can I add a scroll bar to a text area?

Please, anyone, tell me how to add the scrollbar to a JTextArea. I tried out many things. but still not able to get it. I copied some codes related to the text area. Answer Oracle has a helpful tutorial, Creating a GUI With Swing. Skip the Netbeans section. As Andrew said, you have to place the JTextArea inside of a

Is there anyway to get the size of the text in a JTextArea?

The title pretty much says it all. What I don’t mean is how to get the size of the JTextArea. I need to get the size of the actual text. I am completely open to suggestions though. If you have a wonky workaround that involves using something other than JTextArea but still has a similar effect, I’d love to hear

Advertisement