Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JTextField problem

Status
Not open for further replies.

cpope

Programmer
Jul 7, 2000
58
US
In my application, I am enabling/disabling parts of a form based on user interaction. The problem I am experiencing is with the JTextField not being able to assume focus, in other words I cannot select or change the text inside this field, even after it is enabled.

Let us assume jtf is a JTextField component.

In the disabling function it is disabled by:
jtf.setEnabled(false);

To enable the field is done with:
jft.setEnabled(true);

I have tried jft.setEditable(true); but that doesn't do a thing. Has anyone ever encountered this problem?

Thanks!
 
It is actually a different problem...
I just noticed that the problem is not that the field is not editable, it is that the highlight is clear and the text cursor does not appear?

Has anyone heard of this happening?
 
Never heard or seen such problems before... perhaps you could paste some of your codes onto the forum or send the source code to my email? zaoliang@hotmail.com

Regards,
Leon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top