Java examples for Swing:JTextField
JTextField Show Hide
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); } }