Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Error in compiling

Reply
Thread Tools

Error in compiling

 
 
Gaurav Tiwari
Guest
Posts: n/a
 
      06-05-2004
i have written the following program , but while compiling i m getting
the error as :

Note: Applet3.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

i dont know what to do as i m in inital stages of programming plz help
..




// Applet3.java


import java.awt.*;
import java.applet.*;



public class Applet3 extends Applet
{

TextField t ;

public void init()
{
t = new TextField(20);

add(t);
}

public void paint(Graphics g)
{

String s ;
s = t.getText() ;
g.drawString(s,41,50);

}

public boolean action(Event event,Object arg)
{
repaint();
return true ;
}



}
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-05-2004
On 5 Jun 2004 06:00:58 -0700, Gaurav Tiwari wrote:

> i have written the following program , but while compiling i m getting
> the error as :

...
> public boolean action(Event event,Object arg)


<http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html#method_summary>

Check under that for 'action(Event, Object)'..

You might also consider posting to
a different group for the moment..
<http://www.physci.org/codes/javafaq.jsp#cljh>

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Ryan Stewart
Guest
Posts: n/a
 
      06-05-2004
"Gaurav Tiwari" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> i have written the following program , but while compiling i m getting
> the error as :
>
> Note: Applet3.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
>
> i dont know what to do as i m in inital stages of programming plz help

....
> public boolean action(Event event,Object arg)

....

It's a warning, not an error. This means that your program will work fine,
but something it uses may not be supported in the future. That something is
"Event". You should use AWTEvent instead.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 09:47 PM
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
Problems with ld: Unresolved error C++ compiling error stevenruiz@gmail.com C++ 2 02-13-2007 09:04 PM
Problem with C++ Compiling Error ld: Unresolved Error stevenruiz@gmail.com C++ 2 02-13-2007 12:01 AM
Compiling when libedit is in path Is there a trick to compiling Ruby when libedit must exist in the search path? Can you statically link to readline 5.0 in some manner? -- Lon Baker Lon Baker Ruby 1 03-21-2005 08:57 AM



Advertisments