The moose likes Applets and the fly likes uses deprecation API error Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "uses deprecation API error" Watch "uses deprecation API error" New topic
Author

uses deprecation API error

konikadey
Greenhorn

Joined: Aug 01, 2000
Posts: 1
hi,
i have writen a code for selecting text using applet. i have used applet't init()and public boolean action(Event evt, Object arg) . when compiling i am getting an error
" The method boolean action(java.awt.Event, java.lang.Object) in class java.awt.Component has been deprecated, and class select_text(which is not deprecated) overrides it.
public boolean action(Event evt, Object arg){
^
select_text.java uses a deprecated API. Please consult the documentation for a better alternative. 2 warnings"
how should i solve this 2 warning problem.
kindy guide me as iam still a novic.
kindly reply me at my email address konikadey@yahoo.com and konikadey@hotmail.com


<BR>
Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
Deprecated API's are no longer supported. Sun advises against using them. For your specific question, the Java documentation states:

action
public boolean action(Event evt,
Object what)
Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.

If you need information on ActionListener, try looking here in the Java Tutorial: http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html
Next time, please be sure to register with a proper name. "konikadey" does not follow the conventions. See here for details: http://www.javaranch.com/name.jsp
If you do not register properly, your account will be disabled. I would hate to see that happen.
Thank you.
Stephanie
 
 
subject: uses deprecation API error
 
Threads others viewed
I need help
Enabled Web start in NetBeans, but lost database connection
Query in runnig applet
Applet not initialized
please help!
developer file tools