• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

old animation program

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks much Ernest
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic