Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Dispatching events to the event queue.

Posted on 1997-05-28
Medium Priority
Last Modified: 2010-04-16
I'm trying to generate an event and dispatch it to a component.  However, the only way I can find to do this is to use Component.deliverEvent() or Component.postEvent().  The problem with these functions is that they call Component.HandleEvent() directly.  Instead, I want to queue the event behind any other events currently waiting to be handled by the receivng component.  Is this possible and how do I queue and event?
Question by:dpon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 1221033
I'm not actualy sure if it will help, but there is some excellent coverage on events at:


The info on these pages might give you some insight on how to solve your problem.

As an aside, since events can subcalsed, Have you conided writing your own dispatch table?

Expert Comment

ID: 1221034
Have you considered writting your own dispatch handler?

Accepted Solution

mann061997 earned 200 total points
ID: 1221035
Use a statement similar to the following, e.g. to post a

      new MouseEvent(myCustomComp,MouseEvent.MOUSE_CLICKED,

More info is available at http://www.geocities.com/Athens/7077/Java104.htm

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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 explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

604 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