Search:

Type: Posts; User: viper_07

Page 1 of 2 1

Search: Search took 0.27 seconds.

by viper_07
Replies
4
Views
938

Re: How to Stop a Thread Safley

thanks mate thats what i used in the end :)

by viper_07
Replies
4
Views
938

How to Stop a Thread Safley

hi guys i was wonderig what the best way to stop (kill) a thread any ideas ?

by viper_07
Replies
38
Views
1,056

thanks mate :)

by viper_07
Replies
38
Views
1,056

haha yeah thankyou so much for helping me with this :) i am most greatfull

by viper_07
Replies
38
Views
1,056

found the problem

for (int i=0; i<opc;i++){
insted of
for (int i=0; i<=opc;i++){

now the balls are moving the same way at the same speed

by viper_07
Replies
38
Views
1,056

one ball is moving strange too as the print out shows it seems to be on the x axis, i saw post #30 yeah i am going to chenge the window size now

by viper_07
Replies
38
Views
1,056

thats just for one ball

by viper_07
Replies
38
Views
1,056

here is a print out of the posision

x = 758 y = 547
x = 50 y = 524
x = 757 y = 548
x = 49 y = 525
x = 756 y = 549
x = 48 y = 526
x = 755 y = 550
x = 47 y = 527

by viper_07
Replies
38
Views
1,056

it must be something to do with the for loop because all varibles are the same with and without it and when i put a break; after the while the balls work perfectley hmmmm this is deffonatley a...

by viper_07
Replies
38
Views
1,056

it seems that the ball is containd on one side of the page the balls see as tho they are not flowing more like traped on one side

by viper_07
Replies
38
Views
1,056

yeah that was careless of me to have put that there so now only the threads i need are created, but i still can't get to grips with why the out put is
messed when the for loop is in place

by viper_07
Replies
38
Views
1,056

yes that is abit strange, but how can that happen it must be because when
{
//ball.start();

i am starting the ball here when i...

by viper_07
Replies
38
Views
1,056

no the run method should only be run once as it should continue to run
1 thread per ball should be created

i get

X:\Desktop\Programing Resit#\tests\bb2\test 2\test3>javac *.java
...

by viper_07
Replies
38
Views
1,056

this is the print outs i got:
X:\Desktop\Programing Resit#\tests\bb2\test 2\test3>javac *.java

X:\Desktop\Programing Resit#\tests\bb2\test 2\test3>java Bouncing_Ball
run for...

by viper_07
Replies
38
Views
1,056

yes apart from when the new ball is added it is as tho it never go created

by viper_07
Replies
38
Views
1,056

a new runnable thread is created when the user clickes
the run method is called when a thread starts

i found that it runs thread1 then Thread - 3 which i presume is the sleep time it dose that 4...

by viper_07
Replies
38
Views
1,056

that without the for loop

by viper_07
Replies
38
Views
1,056

here is what i got:

start while dx-1
start while dy-1
start while dx-1
start while dy-1
start while dx-1
start while dy-1
start while dx-1
start while dy-1

by viper_07
Replies
38
Views
1,056

array line No in array collum
ovl [0] [0] = X cordinates

ovl [1] ...

by viper_07
Replies
38
Views
1,056

yeah i had a look through the logic the for loop breaks the while as each thread needs to be running in the while at all times, the for loop runs through 1 2 3 individualy shutting off the other...

by viper_07
Replies
38
Views
1,056

[Java] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java - Pastebin.com

by viper_07
Replies
38
Views
1,056

its a gui interface i pasted the section of the code, would you like me to paste bin the whole program so you can see what is going on properly
also there is no compile errors

by viper_07
Replies
38
Views
1,056