O
OziRus
I'm currently coding a find-match game (a kind of memory game). I've
coded in C# but not
yet with Java. I'm working on it but I've a problem as follows;
In the beginning, all pictures are closed. When one of my pictures is
clicked, it will be
opened. Then when second is clicked it will be compared with first. If
first and second is
same, they will be remained opened but when they aren't same, the
second and first will be
shown 1 second then both of them will be closed. I've coded it but I
have some problems
about threading. When I click second (an image that is diffent from
first clicked) they both
are suddenly closed. Second can't be seen. But I want the diffent two-
images remains in
screen for 1 seconds. For this, I wrote a Thread.Sleep(1000); but it
doesn't work. It waits
while second-clicked is still closed. Second can't be seen. I wrote a
Application.doEvents() before Sleep(1000) then Sleep(1000) in c# and
it worked but I don't know how to do Application.doEvents() in Java.
(If I don't write Application.doEvents() in my C# code, It works like
my java program as you might understand...)
Thanks.
coded in C# but not
yet with Java. I'm working on it but I've a problem as follows;
In the beginning, all pictures are closed. When one of my pictures is
clicked, it will be
opened. Then when second is clicked it will be compared with first. If
first and second is
same, they will be remained opened but when they aren't same, the
second and first will be
shown 1 second then both of them will be closed. I've coded it but I
have some problems
about threading. When I click second (an image that is diffent from
first clicked) they both
are suddenly closed. Second can't be seen. But I want the diffent two-
images remains in
screen for 1 seconds. For this, I wrote a Thread.Sleep(1000); but it
doesn't work. It waits
while second-clicked is still closed. Second can't be seen. I wrote a
Application.doEvents() before Sleep(1000) then Sleep(1000) in c# and
it worked but I don't know how to do Application.doEvents() in Java.
(If I don't write Application.doEvents() in my C# code, It works like
my java program as you might understand...)
Thanks.