The idea of CallbackHandler is to serve many tasks, like Login, Errors, etc.
It is very diffcult to implement all possible variants in one class. And if
you success, this is not correct for true OOP. I know such code in Microsoft
C /C++ style, but this is not good.
On 5/8/07, Witold Szczerba <pljosh.mail_at_gmail.com> wrote:
>
> > I haven't any exceptions like yours. But I separate the CallbackHandler
> > and Swing LoginDialog because it is not possible and correct both to be
> > in as one class.
>
> Hello,
> why do you say it is not possible? CallbackHandler is an interface, so
> one can mix it with any other java class. And not correct? I am not
> sure. As long as you reference Swing GUI from within any other class,
> it actually does not matter if this is a separate class or not,
> because such a CallbackHandler depends on that class. So separating
> classes in that case does not introduce any 'loose-coupling' between
> GUI and model internals unless you define some GUI independent
> interface and make your GUI implement it, so CallbackHandler would
> reference that JFrame through such an interface. Implementing my own
> login window is such a small piece of code, that one does not have to
> be so "politically correct" separating GUI from model.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>