javax.swing.JTextField has two uses.
If you need a component that displays or allows entry of more than one line, use
JTextField yourInpuFieldt = new JTextField(16);
content.add(yourInputField);or to add it to a
yourTextField.getText()method whenever you need it. This is probably the most common way.
String x = yourInputField.getText();