Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Listern Problem on Disabled JTextField  RSS feed

 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have added a FocusListener to a JTextField.
However, when the JTextField is in a disabled state, the focus listener doesnt work?
Does anyone know of a work around.
Thanks
/ James
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dorry worry, figured it out.
Should of used setEditabled(false) on the JTextField instead of setEnabled(false).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!