How to get highlighted text in a jtextarea

后端 未结 2 444
你的背包
你的背包 2021-01-23 04:01

I have a jtextarea with some texts. I use java highligher to highlight some texts on that jtextarea. I want to print the content of that textarea to another textarea with the hi

2条回答
  •  鱼传尺愫
    2021-01-23 04:31

    You can just ask the text area for the selected text using the getSelectedText method.

提交回复
热议问题