Deprecation

Hello! I am recompiling code from java 1.2 to java 1.4 and getting a message to compile with the -deprecation option. I did this and get errors like the following:

MaskEngine.java:745: warning: KeyEvent(java.awt.Component,int,long,int,int) in j

ava.awt.event.KeyEvent has been deprecated

KeyEvente = new KeyEvent(new TextField(), 0, 0, 0, 0);

^

1. How do I know what the new class or component is? It states this is a warning but I am getting errors where ever "e" is referenced.

2. If I use the -deprecation and a class file is built, does it mean it substituted the deprecated component with the new component?

Thanks,

David

[689 byte] By [defish102769] at [2007-9-30 7:06:46]
# 1
Hi,The -deprecation option only displays information about deprecated methods or classes. All references to deprecated methods or classes need to be removed manualy from the source code. Information how to replace deprecated references you can find in JavaDoc of used API.
delchee at 2007-7-1 23:13:02 > top of Java-index,Administration Tools,Sun Connection...
# 2
Hello! I have been trying to find this doc, can you be more specific on where I can get the JavaDoc you are referring to. Is the document part of the installation of Java 1.4.Thanks,David
defish102769 at 2007-7-1 23:13:02 > top of Java-index,Administration Tools,Sun Connection...
# 3

Usually the JDK documentation is not a part of installation package and have to be download separately.

Documentation for Java 1.4.2 you can find here http://java.sun.com/j2se/1.4.2/index.jsp (there's a link "Java 2 Platform, Standard Edition version 1.4.2" - this is documentation of the API).

Greetings,

delchee

delchee at 2007-7-1 23:13:02 > top of Java-index,Administration Tools,Sun Connection...
# 4
Thanks!!
defish102769 at 2007-7-1 23:13:02 > top of Java-index,Administration Tools,Sun Connection...