Re: JTextField - how to disable selecting text in this component?



dako wrote:
mearvk napisal(a):
dako wrote:
Hi!

Has anybody an idea, how to do it? I'll be lucky.

Regards, dako
Have you tried JTextField.setEditable(false) ?

If this isn't the problem could you try and make the problem a bit
clearer?

Mearvk

OK, I'll try explain the problem more clearly :) even though I have't
felt comfortable writing EN yet...

I don't need to disable selecting the component for a while or ages...,
but only text within the component.

I hope, it's an enough discribe my problem.


setEnabled(false) and setEditable(false) are different and setEditable(false) would be what you want to prevent people from putting text in it. Disabling the component is done by setEnabled() which wasn't what Mearvk proposed to you.
.