Java examples for Swing:JTextField
How to get or set JTextField columns
import java.awt.FlowLayout; import javax.swing.JApplet; import javax.swing.JTextField; public class Main { public void init(){ //from www.j av a2 s .co m JTextField field = new JTextField("JTextField Columns Example"); field.setColumns(20); int columns = field.getColumns(); } }