jtextarea
How to count the number of lines in a JTextArea, including those caused by wrapping?
I have a JTextArea for which I have set word-wrap and wrap-style-word to true. I want to \"pack\" the JTextArea to the minimum possible height given a specified width.[详细]
2023-03-13 13:11 分类:问答How to read a text file into jtextarea in Java Swing
Here is my code: try { String textLine; FileReader fr = new FileReader(\"ad.txt\"); BufferedReader reader = new BufferedReader(fr);[详细]
2023-03-12 22:27 分类:问答Java Swing - how to scroll down a JTextArea?
I have an application with 开发者_如何学Pythonbasic chat. I use JTextArea for the buffer. After adding a message I want to scroll to the bottom. How can this be achieved?[详细]
2023-03-10 18:16 分类:问答Dynamically Resize a JScrollPane?
I Have two files. One extends JFrame, and another Extends JPanel. Whenever I change the size of the frame, whether it be maximizing, dragging, whatever, i want the ScrollPane to fit itself to the curr[详细]
2023-03-10 17:09 分类:问答Showing text in JTextArea while calculating
An application I am writing consists, among others, a JButton and a JTextArea. A click on the button leads to a long calculation, resulting in a text shown in the JTextArea. Even though the calculatio[详细]
2023-03-07 11:05 分类:问答Line wrap in a JTextArea causes JScrollPane to missbehave with MiGLayout
I am having trouble with the same thing as this guy: MigLayout JTextArea is not shrinking when used with linewrap=true[详细]
2023-03-06 13:43 分类:问答How can I add a clickable URL in a JTextArea?
I am writing an application and in that I am using JTextArea to display some text. Now I want to show some clickable URL in text area along with the normal text and I want if user click on the URL the[详细]
2023-03-06 02:19 分类:问答Text-mouseover popups over a Swing JTextArea?
Is there anything out there that allows you to show a small text popup window (like a tooltip) over individual words or letters in a Swing JTextArea? (Or a JTextArea alternative with similar functiona[详细]
2023-03-05 10:53 分类:问答Setting caret position in JTextArea
I have a JTextArea. I have a function that selects some amount of text when some combination is called. It\'s done properly. The thing is, I want to move caret to the selection beginning when some tex[详细]
2023-03-05 07:40 分类:问答How to calculate the number of rows (and columns in each row) a text takes in a JTextArea?
After getting interested in the problem presented in the question I tried to approach it few times and failed, and I do not like that :)[详细]
2023-03-05 05:01 分类:问答