Reputation: 18819
I have the error java.awt.event cannot be resolved in the statement:
import java.awt.event.ActionListener;
I'm writing an android application that fires an action (by extending the AbstractAction class) when an SMS is received. I'm implementing the ActionListener interface in another class.
EDIT
The above issue is resolved. Now which classes shall I use that'll let me fire actions like in java swing. Or shall I use another way? I basically need to call a method on another thread.
Upvotes: 0
Views: 2066
Reputation: 33544
Java Standard Edition - (AWT + SWING) = Android.
The above statement means that Android doesn't support Swing and AWT
from Java SE.
Android provides its own GUI library, i think usage of GUI in android is far more easier to construct.
Upvotes: 0
Reputation: 1502616
I'm writing an android application
Well that's the problem then... Android doesn't support the whole of the AWT; it has its own GUI libraries. See the platform reference documentation for details. It's not clear which AbstractAction
class you're talking about, either - is it a third-party one? If so, look at that third-party documentation to see whether another library is required for AWT-like classes.
Have you looked at whether what you're trying to do might be better achieved using the "normal" Android platform API instead? I'd expect that to be simpler.
Upvotes: 1