First you will need to create a JTextField


private JTextField text1;


You need to create a JTextField and add it to the screen


JTextField text1= new JTextField(15);