Results 1 to 5 of 5
- 08-19-2011, 08:15 PM #1
Make the TextField unable to write on
Hello there! I was wondering if there was any kind of method that could make a TextField unable to write on it. It's an usual action of textfields in programs, when you select an option that makes the textfield grey-colored and unable to write on it. I'd like to know if there is a method that could perform this action in Java textfields. I hope there is one, thanks.
- 08-19-2011, 08:19 PM #2
- 08-19-2011, 09:13 PM #3
- 08-21-2011, 02:08 AM #4Java Code:
JTextField field = new JTextField(); field.setEditable(true); //if you want to put text in it field.setEditable(false); //if you want to deactivate the textfield and make it uneditable which means you can't type.
- 08-21-2011, 08:06 AM #5
- By qwerty53 in forum New To JavaReplies: 3Last Post: 07-06-2011, 12:50 PM
- By achab in forum Advanced JavaReplies: 38Last Post: 11-06-2010, 01:21 AM
- By DrKilljoy in forum New To JavaReplies: 4Last Post: 09-05-2010, 12:55 AM
- By LeonLanford in forum AWT / SwingReplies: 1Last Post: 09-04-2010, 04:06 PM
- By whwillisiv in forum New To JavaReplies: 0Last Post: 04-28-2009, 04:06 AM