aspose file tools*
The moose likes Beginning Java and the fly likes loop for switch case Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "loop for switch case" Watch "loop for switch case" New topic
Author

loop for switch case

Luen Hong Wuan
Greenhorn

Joined: May 30, 2009
Posts: 23
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

Joined: Oct 13, 2005
Posts: 36590
    
  16
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

Joined: May 30, 2009
Posts: 23
Oh, sorry. I forgot the preview the codes earlier.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36590
    
  16
You still haven't shown us the loop code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: loop for switch case
 
Similar Threads
JRadiobutton problem
Creating Options and Loops
Having troubles with a complex program, need help with an illegal start of type error.
SubClass Blues!
Help on testprogram and subclass please