MVC and Swing
- From: Andre Rothe <cyberdyne_systems@xxxxxx>
- Date: Mon, 25 Dec 2006 23:52:58 +0100
Hi,
Can anyone give me a recipe to handle the following problem:
I try to use Observable in the data model class and Observer in the view
class. But I'm unsure, how I can combine these with Swing model classes.
Is it better to use only Swing or only Observer/Observable? In my view
class (JFrame) I have a JListbox and if I select one entry, the view class
calls a method of the data model and the model class notifies its observer
(and this is also the view class). Is it better to enhance the default
model class of JListbox and to use the Listener functionality? Should I
add a new abstraction layer to my project, which represents the data for
the Swing objects (view - representation - data model)? The same problems
I have, when I use JTextfield or JButton, all of these can have models and
these models are not the data model of my project, but represents a part
of it for a specific view.
Is there a general solution?
Thanks a lot
Andre
.
- Prev by Date: Re: literal string expansion
- Next by Date: Can ctags work with .jar or .zip arvhives?
- Previous by thread: literal string expansion
- Next by thread: Can ctags work with .jar or .zip arvhives?
- Index(es):