This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Using threads and graphics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using threads and graphics" Watch "Using threads and graphics" New topic
Author

Using threads and graphics

Manoj Zachariah
Ranch Hand

Joined: Dec 08, 2003
Posts: 65
this is the first time im using threads. ended up with a problem in the code below. im trying to draw a moving line using the thread



this code gives me an error as below.


thanks
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 685
The compiler can't find the method repaint().
Where is it defined in your code?

There is a repaint() method defined in the Component class.
Does your Left class extend Component or any derivatives of it?
It only implements Runnable, so it won't get ANY of Component's methods.

There are some code examples on this forum that will show you how to use paint() and repaint(). Use search. Rewrite your code and come back again later if you have problems.
Good luck.
 
 
subject: Using threads and graphics
 
Similar Threads
Multiple Threads - runnable, join and yield.
Start: applet not initialized
what will happen if i run it ?
how can i stop my car crossing the roadsides
To Thread