As mentioned earlier, dialog boxes are single-purpose windows for functions such as login and yes/no screens. You can construct your own dialog box with a JDialog component or use one of the Swing components , including JOptionPane, JFileChooser, and JColorChooser. For the assignment, you could use a dialog box as a prompt for how many reservations are needed, if that is part of the functionality your instructions require. The following snippets are examples of using dialog boxes: // Modal OK dialog JFrame myFrame = new JFrame("my new frame"); JOptionPane.showMessageDialog(myFrame, "SCJD or bust"); //File dialog File file = new File(File.separator + "bin"); JFileChooser fileDialog = new JFileChooser(file); fileDialog.showSaveDialog(myFrame); File myFile = fileDialog.getSelectedFile(); |