• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help ping pong game

 
Melissa Lee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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.
 
Shashank Agarwal
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the error message.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic