JTextField Show Hide - Java Swing

Java examples for Swing:JTextField

Description

JTextField Show Hide

Demo Code

 
import java.awt.FlowLayout;
import javax.swing.JApplet;
import javax.swing.JTextField;
 
public class Main {
 
        public void init(){
                JTextField field = new JTextField("JTextField Show Hide Example", 10);
               /*from ww w.  j  av  a 2  s .  c  o  m*/
                field.setVisible(false);
               
                //field.setVisible(true);
               
        }
}

Related Tutorials