469,271 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

ReadOnly JTextField

176 100+
Hello guys. I was wondering if it is possible to make a JTextField read only. In a program I am writing I don't want the user to be able to edit the text in a JTextField.
Jun 4 '08 #1
3 10488
Laharl
849 Expert 512MB
Look at the API for JTextComponent and JTextField. There's something like setEditable.
Jun 4 '08 #2
Kid Programmer
176 100+
Look at the API for JTextComponent and JTextField. There's something like setEditable.
Thanks that worked :-)
Jun 4 '08 #3
JosAH
11,448 Expert 8TB
Another lesson learned: always read the appropriate API documentation sections
first before you start banging that keyboard; it saves you a lot of time.

kind regards,

Jos
Jun 4 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Alexander Mazo | last post: by
oll3i
1 post views Thread by oll3i | last post: by
1 post views Thread by dig909 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.