Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overrides a deprecated API??

Status
Not open for further replies.

LaPluma

Programmer
Feb 3, 2002
139
DE
Hello

I have an applet menu .java file which, when I tried to
compile it, MS-DOS gave me the following message:

menu.java uses or overrides a deprecated API.
Recompile with -deprecation for details.

So, I typed in:

javac -deprecation menu.java

and it gave me: 5 errors (as before) and 79 warnings!
Is that a record!? One of the errors (or warnings)
concerns the mouseMove event, for example.

What am I supposed to do now? Start again?

Thanks for any advice!

Best wishes
>
 
Check the methods you use, a lot of the methods from earlier java files in GUIs (Java 1.0's system) are deprecated, looks like you're using the deprecated event handlers from version 1.0, I haven't used Java 1.4 yet, I use 1.3.1, so I'm not aware of any other deprecations but I'd just use newer methods in place of any deprecated ones you find.
 
Guys, maybe LaPluma didn't know what 'deprecated' meant?......(apologies if you did!)

Briefly, if a method is deprecated it means that some of Java has been rewritten and better methods are available. The old methods are left in so that programs can continue to work, but you are warned (by the error message at compilation) that it is wise not to carry on using them.

The applet code is probably quite old. I would rewrite it using the newer, approved event handlers. Jeremy Nicholson, Director of a UK-based Java and Data Warehousing consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top