• Post Reply Bookmark Topic Watch Topic
  • New Topic

old animation program  RSS feed

 
Brad Cantrell
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im currently reading "The Black Art of Java Game Programming" which was published in late 96. Besides the 4 errors which Im sure is due to some missing bracket, I get a note on the bottom that this program is using a deprecated API. Im wondering what the proper import heading should be. Does java.swing take the place of java.applet?
Heres my error code"

And the program code:
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You have an 'loxy' in your code that should be 'locy.' Also, in your source code you need to change 'Down' to 'DOWN'. That will clear up the first three compiler errors.

The deprecation is just a warning, telling you the source code contains a call to Thread.sleep() that should be replaced. I'm going to assume you're not sure what that means, so for now you should know this is not a fatal problem. Your program will run with deprecated calls.

(gads, my typos are awful these days...)
[ September 11, 2005: Message edited by: Michael Ernest ]
 
Brad Cantrell
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks much Ernest
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have also mispelled "Thread" as "Thead" (see the difference)? These kinds of error are difficult to catch since your eye often skips over missing or additional characters.

Note that Thread.sleep() is not deprecated. The error message doesn't tell us which deprecated APIs you are using. You need to follow the directions (use the -Xlint eprecation flag when you compile) to get more information so we can help you.

Layne
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!