Link to home
Start Free TrialLog in
Avatar of Drop_of_Rain
Drop_of_Rain

asked on

call a class from action performed

Simple question. I am new at this and want to learn this part. I know how to call am a inner class I made it outter now. I want to know that when I press a button in a action performed Event what code do i need to add to call it up, it has its own window. It name is StopWatch()
Avatar of sciuriware
sciuriware

Make your class an ActionListener!

;JOOP!
ASKER CERTIFIED SOLUTION
Avatar of sciuriware
sciuriware

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In the same class you can add Timers to have the same access to public void actionPerformed(ActionEvent a)
{
    Object o = a.getSource();

     if(o == b) // it's the button

And so on ....

;JOOP!
Avatar of Drop_of_Rain

ASKER

I'm posting another question can you look for it, it comes up from the comment you made in the question.
it's about implements runable and actionListener maybe rewting the class