I am new in swing, but managed to create a descend gui.
My problem though is that I was not able to apply the patterns suggested in references/tutorials, mainly the MVC pattern.
Is it me, or in JTree and using SwingWorker, it is not possible to have a clear separation of controller/view/model?
For example I use a Swingworker, but then I can not "fit" a controller in the design.
I.e. the action of the control essentially is in the doBackground method that is inside e.g the action perform of a button.
So no controller class.
The result of the action in swing worker is to update a Jtree, so I pass the result to a class I named model, but this class has to have access to the treeModel of the Jtree that is inside the JFrame i.e. the view, so no clear separation of view and model.
I looked at a lot of tutorials but all presenting the MVC had a trivial example, and in most cases the view (which was just a some labels!) updated everything. Am I completely confused, or it is not posible or at least easy to integrate an MVC pattern in a swing application that uses swingworkers and jtrees?
I am talking about the actual domain data and not the MVC that is implemented in the swing components.
Can someone help me (and spare me from this terrible headache) either with an overview of how this design could be approached or at least with a tutorial, that is useful, with a non-trivial example?
Thanks