I am doing an xml editor as one of our projects in the class, and to add an attribute I am currently doing this:
String name = JOptionPane.showInputDialog(this, "Enter the attribute name: ", "Name", JOptionPane.INFORMATION_MESSAGE); String value = JOptionPane.showInputDialog(this, "Enter the attribute value: ", "Value", JOptionPane.INFORMATION_MESSAGE);
Is there a better way to have only one dialog box with these things on it? I looked at some examples, but I had problems with their implementation / understanding. Although I can correctly add attributes using the current method, it's silly to have two input fields.
Please let me know if there is any simple solution. Thanks
source share