ActionListener + FocusListener -> same class?
Hello, Just a quick question
If i got a class that implements ActionListener and it does my event handling for my textfields and stuff. How do i write my focusListener within my ActionListener class?
I have already created a seperated class for my focusListener however i want to combined them into one class
I've been scratching my head for a few hours. and i'm just stump.
My program does what i want but i just want it in one neat file =(.
i thought it be easy and be something like this? but i honestly don't know the grammar for implementing stuff.
Quote:
public class name implements ActionListener, FocusListener{
}
Re: ActionListener + FocusListener -> same class?
What have you tried and what went wrong? The above syntax should work so long as your class actually implements the interfaces.
Re: ActionListener + FocusListener -> same class?
wow i thought my grammar was wrong.
I found out my problem i was trying to compile right away without the necessary focus method.
-___-
thanks a lot