i need your help!!! JOptionPane!

ii)Allow user to enter more than one choice, the choices are separated by ?delimiter.How to edit the following code?

JOptionPane.showInputDialog(null,"Enter your choice of drink:\n"

+"1.Coke(60cents)\n"

+"2.Pepsi(60cents)\n"

+"3.Soya Bean(50cents)\n"

+"4.Green Tea(70cents)\n"

+"5.Ice Coffee(80cents)\n"

+"6.Ice Lemon Tea(90cents)\n",

"SP Vendimatic VendingMachine",

JOptionPane.QUESTION_MESSAGE);

A user can select more than one choice. The choices must be separated by ?delimiter.

Need to use string tokenizer?

[587 byte] By [kwsng18-01a] at [2007-11-26 13:56:24]
# 1
Don't use a JOptionPane for this.Create your own JDialog with a JList.
zadoka at 2007-7-8 1:35:54 > top of Java-index,Java Essentials,New To Java...
# 2
> Don't use a JOptionPane for this.> > Create your own JDialog with a JList.JList won't work well if the customer can choose more than one of the same drink.Use String.split instead of StringTokenizer.
doremifasollatidoa at 2007-7-8 1:35:54 > top of Java-index,Java Essentials,New To Java...