/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

that what i don't know how to make it exit the loop, but the problem is why when i run the file it works, when i run the hole project it loop??

06-02-2011, 11:20 PM

Norm

Quote:

when i run the file it works

What is different? What makes the code exit the loop??? There is no code shown to exit the loop.
When it works, it must not execute the Start() method. Why is that?

Add lots of printlns that show what the difference is.

06-02-2011, 11:25 PM

rowanabejjani

it works great when i run only the file.. it drives me crazy, it passed the loop with all the prints,
if i have another game in the project it can affect this game???

06-02-2011, 11:28 PM

Norm

Quote:

it passed the loop

do you mean it did NOT call the Start() method?

Why does the Start() method loop forever???

06-02-2011, 11:31 PM

rowanabejjani

yes it call the start(), then the jouer() start()..... no errors or loop forever (sorry for my english)

06-02-2011, 11:34 PM

Norm

Change the while(true) loop to a for() loop that only loops a few times and see what happens.

06-02-2011, 11:43 PM

rowanabejjani

didn't work :S

06-02-2011, 11:55 PM

Norm

No way to fix a program that "doesn't work".
You'll have to be more descriptive of what you did and what happened and what should have happened.

06-02-2011, 11:56 PM

rowanabejjani

ok when i put for() the loop is now on the method jouer().....

06-02-2011, 11:57 PM

Norm

Is that good or bad?
If bad, please explain.

06-02-2011, 11:57 PM

rowanabejjani

and i got the screen work (the graphics) its no more white, this is a step

06-03-2011, 12:00 AM

Norm

Are you calling any long running methods from with any listeners?
This will be a big problem. You must start separate threads for long running methods, otherwise they will cause the GUI to hang.

06-03-2011, 12:08 AM

rowanabejjani

can you tell me how to do it?

06-03-2011, 12:13 AM

Norm

My suggestion is to write a small simple program with a listener. Then add code to the listener to start another thread. Have the other thread print, sleep and then print to demo it is NOT freezing the GUI.
Work on that until you get it to work. Post questions here if you have problems.