Java examples for Swing:JTextField
JTextField Disable Enable
import java.awt.FlowLayout; import javax.swing.JApplet; import javax.swing.JTextField; public class Main { //from www .j a v a2s . co m public void init(){ JTextField field = new JTextField("JTextField Disable Enable Example",20); field.setEnabled(false); //field.setEnabled(true); } }