Here you can find the source of createJTextField(Rectangle bounds)
JTextField
object with the given properties.
Parameter | Description |
---|---|
bounds | The position and dimension attributes |
JTextField
object
public static JTextField createJTextField(Rectangle bounds)
//package com.java2s; import java.awt.Font; import java.awt.Rectangle; import javax.swing.JTextField; public class Main { /**// ww w . j a v a2 s. c o m * Creates a new <code>JTextField</code> object with the given properties. * * @param bounds The position and dimension attributes * @return A <code>JTextField</code> object */ 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; } }