View Single Post
Old Apr 30th, 2005, 1:01 AM   #2
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 406
Rep Power: 5 xavier is on a distinguished road
Send a message via Yahoo to xavier
Well, this is how i see it:

while (found != false) {
is not correct cause it will only go into the while loop if found == true. So change that to : found != true.
Next it enters the while loop. If your film is fourth, it will show the notFound window 3 times i believe.
if(film found on step 1)break;else (error);
if(film found on step 2)break;else (error);
and so on.

What you should do is in my opinion
if (filmName.equals(searchfilmName.toLowerCase())) {
                    displayInfo();
                    found = true;
                    break;
                }

if(endOfTable){
                    Frame4 form = new Frame4();
                    form.setSize(500, 550);
                    form.setVisible(true);
                    this.hide();
                }

You have to somehow determine if there are any more entries in your movie table, and if you have reached the end and you haven't yet found the movie, so no break happend .... show the error paged.

I hope i explained it right
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote