On Mon, 28 Jan 2013 21:19:03 -0800 (PST), K <> wrote,
quoted or indirectly quoted someone who said :
>I made a java program and can't figure out why my uneditable text can still be edited
see sample code at
http://mindprod.com/jgloss/jpasswordfield.html
it works fine with setEditable( false )
You made an error that would not likely have happened with more
meaningful names for your variables:
item3 = new JTextField("Enter text here");
item3.setEditable(false); <-- you meant true
item4 = new JTextField("Can't edit", 20);
item3.setEditable(false); <-- you meant item4
let me rename the vars:
canEnter= new JTextField("Enter text here");
canEnter.setEditable(false); <-- you meant true
cantEnter= new JTextField("Can't edit", 20);
canEnter.setEditable(false); <-- you meant cantEnter
--
Roedy Green Canadian Mind Products
http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development
time.
~ Tom Cargill Ninety-ninety Law