开发者

Event base programming [closed]

开发者 https://www.devze.com 2023-01-23 12:35 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_Go百科 Closed 12 years ago.

What is best way to do event base programing in Java. Is there any tools or API available for the same.


Use interfaces. For example, create an interface IOnMouseDown which has method OnMouseDown() and create an event manager which adds any IOnMouseDown objects to a list of listeners. When the event is triggered, call each one.


Googling "event based programming java" gives you a lot of already-written answers!

I verified.


If you are doing any work with a GUI, you are already using event based programming.

Can you please add more detail to your question, such as what environment and usage you are talking about? As it stands there is not enough context to answer your overly broad question.


Esper is one of the open source alternatives


You mean something like the Event Observer Pattern?

0

精彩评论

暂无评论...
验证码 换一张
取 消