one-lined input-dialogue
javax.swing.JOptionPane.showInputDialog(..)
For a simple input there is already a prefabricated dialogue:
String result = JOptionPane.showInputDialog(zero, "entry please:", "entry-heading", JOptionPane.QUESTION_MESSAGE);