List of usage examples for javax.swing JTextField setBounds
public void setBounds(Rectangle r)
From source file:Main.java
/** * Creates a new <code>JTextField</code> object with the given properties. * * @param bounds The position and dimension attributes * @return A <code>JTextField</code> object *///from ww w .jav a2s.c om public static JTextField createJTextField(Rectangle bounds) { JTextField txtField = new JTextField(); txtField.setFont(new Font("Times New Roman", Font.PLAIN, 12)); txtField.setBounds(bounds); return txtField; }