How to Use Text Areas (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)Text areas are editable by default. The code setEditable(false) makes the text area uneditable. It is still selectable and the user can copy data from it, but the user cannot change the text area's contents directly.
Java Core GUI APIs: JTextArea / Disabling selection ,Java Core GUI APIs. - thatsjava.comI have a JTextArea, in which will contain various text.
The component should not be editable, and likewise should not be selectable.....
I still have not found a way to disable text selection in a JTextArea, in fact any subclass of JTextComponent for that matter.
why setEnabled(false) does not prevent selection is beyond me........
Aus dem editable(false) ergibt sich das selectable(false) ist doch?.
Text areas are editable by default. The code setEditable(false) makes the text area uneditable. It is still selectable and the user can copy data from it, but the user cannot change the text area's contents directly.
bei mir funktionierts nicht im Programm, sonst hätte ich das angegeben. In der TextPane arbeite ich mit Documents, könnte es damit zusammenhängen?