JTextField Disable Enable - Java Swing

Java examples for Swing:JTextField

Description

JTextField Disable Enable

Demo Code

 
 
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);
        }
}

Related Tutorials