• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField non editable Help Urgent!!!!

 
Dorj Galaa
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I'm developing one readonly component extends JTextField
how to set readonly property
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dorj,
try something like this which works for me...

Ben
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if you use method: mytextfield.setEnabled(false); you wont be able to edit it so you do not have to use method setEditable(false);
Originally posted by Ben Wood:
[B]Hi Dorj,
try something like this which works for me...

Ben[/B]

thank you all
Yoel
 
Vinod Venugopal
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a reminder,
If u use setEnabled(false) , then the component won't get focus while tabbing using keyboard.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!