• 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

Help ping pong game

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.xnet.se/javaTest/jPong/jPong.java

I am trying to compile & run this source code, but it says error while compiling as it overides API, Why does it says that?

I have save it in a notepad wz name jPong.java, but when I javac it an error message appear?
Can anybody help me out?
Is the code not good else if somebody have a good source code for that game I'll love to have it.
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the error message.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Melissa,

I'm betting the message is something like

Note: jPong.java uses or overrides a deprecated API.
Note: Recompile with -Xlint eprecation for details.

This is a warning, not an error, and the code compiles fine. You can ignore the message and just use the compiled applet. But if you compile with

javac -Xlint eprecation jPong.java

you'll get lots of specific messages that will give you an idea of what needs fixing. One of the biggies is the use of the "size()" method on things that extend java.awt.Component; you're supposed to use getSize() instead.
[ February 02, 2005: Message edited by: Ernest Friedman-Hill ]
reply
    Bookmark Topic Watch Topic
  • New Topic