// sample use of JOptionPane.showInputDialog
import javax.swing.JOptionPane;

String constellationName = (String)JOptionPane.showInputDialog(
                                                              this,
                                                              "Enter unique new constellation name:",
                                                              "New Constellation",
                                                              JOptionPane.QUESTION_MESSAGE,
                                                              null /* icon */,
                                                              null /* possibilities */,
                                                              null /* default */ );