471,887 Members | 778 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 10609
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 zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.