Source Code : TextField Example
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
TextField Example

/*
Core SWING Advanced Programming
By Kim Topley
ISBN: 0 13 083292 8
Publisher: Prentice Hall
*/
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.UIManager;
public class TextFieldExample {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception evt) {}
JFrame f = new JFrame("Text Field Examples");
f.getContentPane().setLayout(new FlowLayout());
f.getContentPane().add(new JTextField("Text field 1"));
f.getContentPane().add(new JTextField("Text field 2", 8));
JTextField t = new JTextField("Text field 3", 8);
t.setHorizontalAlignment(JTextField.RIGHT);
f.getContentPane().add(t);
t = new JTextField("Text field 4", 8);
t.setHorizontalAlignment(JTextField.CENTER);
f.getContentPane().add(t);
f.getContentPane().add(new JTextField("Text field 5", 3));
f.pack();
f.setVisible(true);
}
}
Thank with us