Enter a name and address in an input dialog box


Create a program called MailingLabel.java The program should ask the user to enter a name and address in an input dialog box with each component of the address seperated by a comma. For example, "Joe Smith, 123 N. Main Baltimore, MD,21027" The program should then use the comma as a delimiter and create a single string that displays each token on a seperate line, except that the city/state/zip should appear on the same line. Create a formatting string to hold all formatting information. Use one application of the String.format method to format the mailing label. Output should be directed to a GUI window using the JoptionPane class. (Hint: Use the trim method of the string class to remove leading and trailing spaces from tokens) 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Enter a name and address in an input dialog box
Reference No:- TGS0142568

Expected delivery within 24 Hours