textarea user select disable java swing
JtextArea.setHighlighter(null);
Here is what the above code is Doing:
1. Create a JTextArea
2. Create a JScrollPane
3. Add the JTextArea to the JScrollPane
4. Add the JScrollPane to the JFrame
5. Set the JTextArea’s highlighter to null