Link to home
Start Free TrialLog in
Avatar of Mayank S
Mayank SFlag for India

asked on

posting to event-queue

Hi folks,

Can I make my own event class (that extends AWTEvent) and post it to the event-queue? Will the event-queue take care of calling listeners for it? How to add listeners for this kind of an event?

Thanks,
Mayank.
Avatar of hoomanv
hoomanv
Flag of Canada image

Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(AWTEvent theEvent)
Avatar of Mayank S

ASKER

I know that, we can directly use EventQueue.postEvent () in fact. But how do I go about adding listeners to the sources? They will be my own classes (sources as well as listeners).
SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

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
ASKER CERTIFIED SOLUTION
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
CEHJ, that is how I had done it - was wondering if there is a shorter approach ;-)
:-)