JTextArea / Disabling selection
843804Sep 16 2001 — edited Dec 21 2004Im getting a bit frustrated with this, hence my post....
I 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........
I had a similar problem once before, and my solution was to set selection color to thed, which worked just fine, despite not really solving the problem....
I would probably go ahead and use this technique again, however I have a different situation here, Im using a translucent background, (0,0,0,0) and setting selection color to this value does not seem to work...
Is there a way to totaly disable selection???
Should I possibly use a different component to handle the task, which does not support selection, ( Ihavent found anything yet). I need to have line wrap so a few of the more basic components are out of question....
Im hoping some would give me some suggestions on this, they will be greatly apreciated, and as always adequately rewared....
Thanks
J.Prisco