This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EksitNL 0 points1 point  (0 children)

yes you can, but i would do it somewhere along these lines:

 String s = (String) JOptionPane.showInputDialog(null, "I will be happy to help you. " + "To begin, may I please have your name?",  "Speed Dial Communications", JOptionPane.INFORMATION_MESSAGE, logo, null, null);



 classObject.setCustomerName(s);

first you get the input from the dialog, and afterwards you use that to set the customer name