-
Thread error
I keep getting an error with the thread constructor in java. Here's the basic of what I have in the 'faulty' program.
import java.awt.*;
import java.net.*;
import java.applet.*
public class WordSearch extends Applet{
Thread th;
public void init() {
}
public void start(){
th = new Thread (this);
th.start();
}
public void run(){
}
public void paint(Graphics g){
}
}
and....for some odd reason...here is the error I get.
WordSearch/WordSearch.java [13:1] cannot resolve symbol
symbol : constructor Thread (WordSearch)
location: class java.lang.Thread
th = new Thread (this);
^
1 error
Errors compiling WordSearch.
Does anyone know why its doing this? A similar error I've had before, without changing anything, had something to do with APIs and compiling with -deprecation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks