Hi Glenn,

To expand on what Rani said, there are certain classes and methods which
were done one way in JDK 1.0.2 and have been dramatically changed in 1.1 .
When you get a deprecated warning on a class/method the compiler is
telling you've used an old way of doing things which is in the process of
being phased out.  Specifically, the message you're getting is reflecting
the fact the most significant thing that changed between JDK 1.0.2 and 1.1
is the way events are handled.  1.1 has a much simpler, more efficient way
of handling events where instead of passing event up the stack to be
handled, you implement listener interfaces which catch the specific event
types you're looking for.  As Rani said you must be using code or a book
which is using the 1.0.2 event model.  It will still work fine (for the
time being), but you'll get those deprecation warnings.

For instructions on how to upgrade your events to 1.1 style see.
http://java.sun.com/products/jdk/1.1/docs/guide/awt/HowToUpgrade.html#events

Marcus
P.S. (I'm an alum of CU-Boulder!)

On Sun, 14 Jun 1998, Rani Pinchuk wrote:

> Hi,
> 
> >From http://java.sun.com/products/jdk/1.1/docs/guide/awt/DeprecatedMethods.html: 
>       The AWT changed significantly between the 1.0.2 and 1.1 releases. 
>       Certain old ways of doing things are deprecated -- no longer 
>       recommended -- and might not be supported in a future major release
> 
> Look also in 
> http://java.sun.com/products/jdk/1.1/docs/relnotes/deprecatedlist.html
> 
> I guess the book you use writes in jdk1.0.
> 
> Rani.
> 
> On Sun, Jun 14, 1998 at 06:50:06AM +0000, Glenn Valenta wrote:
> > When I compile application(not applets) examples out of most of my 
> > books, (Java-how to program) I get the error ...
> > 
> > "Addition.java uses a deprecated API.  
> >     Recompile with "-deprecation" for details."
> > 
> > And when I recompile with "-deprecation", I get this message...
> > 
> > Addition.java:21: Note: The method boolean action(java.awt.Event, 
> > java.lang..Object) in class java.awt.Component has been deprecated, 
> > and class Addition (which is not deprecated) overrides it.
> >   public boolean action(Event e,Object o)
> >                  ^
> > Note: Addition.java uses a deprecated API.  Please consult the 
> > documentation for a better alternative.
> > 
> > What does it mean and where in the documentation?
> > 
> > Source and example are at.....
> > 
> > http://ouray.cudenver.edu/~gavalent/java/test2/Addition.html
> > 
> > TIA!
> > 
> > -- 
> > Glenn Valenta  Engineering http://www.coloradostudios.com
> > [EMAIL PROTECTED]   http://ouray.cudenver.edu/~gavalent/
> > [EMAIL PROTECTED]  <-main mail account
> > 
> > 
> 
> -- 
> ------------------------------------------------------------------------------
>     Rani Pinchuk <[EMAIL PROTECTED]>         Tel:  +32-3-326-79-97
>     http://www.kinetica.com/home/pinchuk        
> ------------------------------------------------------------------------------
> 

Reply via email to