I am working with NetBeans (Swing) and I need to get first name and last name in same dialog box (so those can be edited by user and saved). How do I do this? With this code below they appear in their own dialog boxes but everything else works.
private void editName(java.awt.event.ActionEvent evt) {
String newName = JOptionPane.showInputDialog(this, "Name", people.get(current).getFirstName());
if (newName != null)
people.get(current).setFirstName(newName);
update(people.get(current));
newName = JOptionPane.showInputDialog(this, "LastName", people.get(current).getLastName());
if (newName != null)
people.get(current).setLastName(newName);
update(people.get(current));
}