Look at the API doc for the JTextField class. There are several constructors that that initial values.