Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loop for switch case

 
Luen Hong Wuan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried to loop a switch case, to prompt for continuation, instead of stopping after one process is done. It resulted in an endless parse, lol.

The code is as below:



I've wanted to do something like, when the program ask if the user wants to continue the transaction and the user says yes (assuming its a confirmDialog with yes/no), it shows this part again :



Can someone point out to me where and which loop do I use to perform such event?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49412
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't use such long lines; your code is hard to read and I had to edit it.

You haven't shown us the code of your loop, so we can't tell how the loop works.
 
Luen Hong Wuan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, sorry. I forgot the preview the codes earlier.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49412
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You still haven't shown us the loop code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic