Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

compile error

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,I have a class and when I compile the class I get this message but I could not undrestand it :

Note: C:\j2\bin\BattleStar.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.

Tool completed successfully






public class BattleStar extends JFrame implements Runnable, MouseListener
{
//Data Fields

public void BattleStar( ){
...}
public void start( ){
...}

public void stop( ){
...}

public void run( ) {
... }

public void step( )
{..
repaint();
... }

public void mouseClicked (MouseEvent theEvent) {
...}

public void mouseEntered (MouseEvent theEvent) { }
public void mouseExited (MouseEvent theEvent) { }
public void mousePressed (MouseEvent theEvent) { }
public void mouseReleased(MouseEvent theEvent) { }

public final synchronized void update(Graphics g)
{
...}

public void paint(Graphics g)
{... }

}
 
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
This is a warning, not an error, and you can safely ignore it for now.

A "deprecated" method is one that Sun recommends you don't use in new code, because a better replacement exists. If you use the -deprecation switch, as advised, you'll get more details about exactly what deprecated method you're using. If you look at the Javadoc for that method, it will tell you what the replacement is.
 
reply
    Bookmark Topic Watch Topic
  • New Topic