How to use a thread

when using TurtleGraphics how would you use a thread to make an image move
[81 byte] By [cupOfJava2008a] at [2007-11-27 6:15:59]
# 1
I don't know what TurtleGraphics are, but you should update the x and y values of the image inside the run() method.
CaptainMorgan08a at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...
# 2

> when using TurtleGraphics how would you use a thread

> to make an image move

How much about threading do you know? Are you using Swing graphics? This is important because the Swing GUI runs under one thread, and many Swing methods have to be called in a thread-safe way if you are going to be playing with threads here.

petes1234a at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...
# 3
i dont know that much about threading and im not using Swing so how would i go about making one
cupOfJava2008a at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...
# 4
Then I would start with a textbook, or lacking that, look [url= http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html]here[/url].
petes1234a at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...
# 5
> when using TurtleGraphics how would you use a thread> to make an image movetie it to the turtle's tail.
jwentinga at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...
# 6

> > when using TurtleGraphics how would you use a

> thread

> > to make an image move

>

> tie it to the turtle's tail.

Turtle's have small tails and usually tuck it under their shell making it very difficult. I suggest one of the back legs instead.

floundera at 2007-7-12 17:27:13 > top of Java-index,Java Essentials,Java Programming...