Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

listeners in Java

Posted on 2012-03-14
3
Medium Priority
?
191 Views
Last Modified: 2013-11-24
I have done much ActionScript3 before and it uses listeners to detect some condition. Java has been around longer so I expect this is simialr.

If I want to for example put a whole lot of data into an array in class, and then I want something to tell me when this is done in the 'main' , I use a 'lisetner'.

Hw do I code for this.
0
Comment
Question by:jagguy
[X]
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
3 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 37723743
You need to understand first the event handling in Java.
http://www.scoug.com/os24u/1999/scoug905.2.javaevents.html
0
 

Author Comment

by:jagguy
ID: 37723821
I really need a complete example as i didnt follow that.

just say i make a call to a procedure to fill an array with a lot of data. i want a listener to tel me when the array has finished filling
0
 
LVL 40

Accepted Solution

by:
Gurvinder Pal Singh earned 2000 total points
ID: 37723853
A complete example of your requirement will take some time and effort to complete, I'm not able to get the same from internet.
Basically, you need to generate an event when array filling is finished, and add a subscriber to that event so that once that event is completed, subscriber will be notified for the same.
0

Featured Post

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.

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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
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.
Suggested Courses

721 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