We help IT Professionals succeed at work.

listeners in Java

jagguy
jagguy asked
on
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.
Comment
Watch Question

CERTIFIED EXPERT

Commented:
You need to understand first the event handling in Java.
http://www.scoug.com/os24u/1999/scoug905.2.javaevents.html

Author

Commented:
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
CERTIFIED EXPERT
Commented:
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.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.