Results 1 to 4 of 4
Thread: [SOLVED] While
- 03-13-2009, 05:01 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 33
- Rep Power
- 0
[SOLVED] While
How can I make the loop so it goes from "Du må legge inn data." to the showinputdialog? Now its just says "Du må legge inn data." and a ok button. If I push ok it just repost the "Du må legge inn data.".PHP Code:int resultat = showConfirmDialog(null, "Vil du sette inn penger?"); if(resultat == YES_OPTION){ String tekst = showInputDialog("Hvor mye vil du sette inn:"); while(tekst == null || tekst.trim().equals("")){ showMessageDialog(null, "Du må legge inn data."); } double settInn = Double.parseDouble(tekst); showMessageDialog(null, "Penger igjen på konto " + MikeTyson.innskudd(settInn) + " NOK."); }
"Du må legge inn data." = You have to input data..
- 03-13-2009, 05:05 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Put the same code segment inside the loop.
Java Code:tekst = showInputDialog("Hvor mye vil du sette inn:");
- 03-13-2009, 05:16 PM #3
Member
- Join Date
- Oct 2008
- Posts
- 33
- Rep Power
- 0
Cheers!!
Thanks... Thanks alot..
- 03-13-2009, 05:26 PM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Welcome! If you have solve the problem please mark the thread solved.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks