?
Solved

posting to event-queue

Posted on 2006-06-01
6
Medium Priority
?
234 Views
Last Modified: 2010-03-31
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.
0
Comment
Question by:Mayank S
  • 2
  • 2
  • 2
6 Comments
 
LVL 14

Expert Comment

by:hoomanv
ID: 16807987
Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(AWTEvent theEvent)
0
 
LVL 30

Author Comment

by:Mayank S
ID: 16808013
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).
0
 
LVL 14

Assisted Solution

by:hoomanv
hoomanv earned 200 total points
ID: 16808472
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Accepted Solution

by:
CEHJ earned 300 total points
ID: 16808760
This probably covers all you need:

http://javaalmanac.com/egs/java.util/CustEvent.html
0
 
LVL 30

Author Comment

by:Mayank S
ID: 16808830
CEHJ, that is how I had done it - was wondering if there is a shorter approach ;-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 16850499
:-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question