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
posted
0
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.