Re: Callbacks, and using interfaces as arguments




IchBin wrote:
> Mike wrote:
> > I have the following code snippets. Both has a method call to
> > addWindowListener
> >
> > It is my understanding that BookOrderFrame is using a callback method
> > to implement the interface for WindowListener. Am I correct?
> >
> > LoanCalculatorFrame otoh, does it substantially different and does not
> > even state "implements WindowListener".
> >
> > So can anyone please explain what LoanCalculatorFrame does and whether
> > and how it is better/worse than what BookOrderFrame is doing?
> >
<snipped code >

> The Docs for WindowListener Interface I think explains it.
>
> The listener interface for receiving window events. The class that is
> interested in processing a window event either implements this interface
> (*and all the methods it contains*) or extends the abstract
> WindowAdapter class (*overriding only the methods of interest*).
>

I am sorry if I didn't explain myself very well. I understand (I think)
what WindowListener interface does. What I don't understand is the
differences in the implementation between the two example classes that
I posted.

.