I have a question about this...

I'm learning Java by myself using a book by Deitel and Deitel.

I was doing this one:

//programa de suma

import java.awt.*; //importar paquete java.awt

import java.applet.Applet;

public class Addition extends java.applet.Applet {

Label prompt; //solicta entrada al usuario

TextField input; //introducir valores

int number; //almacenar valor introducido

int sum; //almacenar suma de enteros

//preparar componentes de interfaz grafica de usuario e incializar variables

/** Initialization method that will be called after the applet is loaded

* into the browser.

*/

public void init() {

prompt = new Label( "Teclee un numero y presionae Intro: ");

input = new TextField(10);

add(prompt); //poner prompt (solicitud) en la applet

add(input); //poner input(entrada) en la applet

sum=0; //hacer suma igual a cero

// TODO start asynchronous download of heavy resources

}

//procesar la accion del usuario en el campo de texto de entrada public boolean action(Event e,Object o)

public boolean action( Event e, Object o)

{

Integer.parseInt( o.toString() ); //obtener numero

input.setText( "" ); //despejar campo de entrada de datos

sum= sum + number; //suma numero a suma

showStatus( Integer.toString(sum)); //mostrar resultado

return true; //indica que la accion del usuario se proceso

}

// TODO overwrite start(), stop() and destroy() methods

}

--

Well, when i tried to compile i got this error:

init:

deps-jar:

Compiling 1 source file to C:\Documents and Settings\alhela\Welcome\build\classes

Note: C:\Documents and Settings\alhela\Welcome\src\Addition.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

compile:

run:

BUILD SUCCESSFUL (total time: 4 seconds)

-

I already searched the forum and found something similar, but it didin't help very much.

What should i do? and How?

What is "-Xlint"?

[2143 byte] By [GaaraMonstera] at [2007-10-3 9:28:44]
«« Stream closed
»» BOX
# 1
Ok, found an answer.I used @Override, the applet runs but it doesn't do a thing.It doesn't do the addition.How do i fix that?
GaaraMonstera at 2007-7-15 4:43:11 > top of Java-index,Developer Tools,Java Compiler...
# 2
Your program uses a deprecated method somewhere. You need to find which one it is and replace it with the new one.
CaptainMorgan08a at 2007-7-15 4:43:11 > top of Java-index,Developer Tools,Java Compiler...
# 3
public boolean action( Event e, Object o)this is the problem...action() method is deprecated as of jdk 1.1try to use ActionListener instead...! ;)
shocketa at 2007-7-15 4:43:11 > top of Java-index,Developer Tools,Java Compiler...