how do listeners in java work
<p>I would like to know if it is possible to create a listener to a listener. For example if I have a listener for a button, can I create a listener to that listener such that once the button is pressed the listener of the button listener would be notified.</p>

<p>My other concern is if I have a function call which has some listeners inside it would these listeners be destroyed on the return of the function call. For example can I have a function that I call in the beginning of the program that has listeners to listeners from my main program?</p>
