In my rough design, I want to use a class to act as a client service. It is just like a servlet that gains all events from UI and decided what to do next. But there are some problems: 1. In order to let all my UI pages know the service, I need to pass it as an argument whenever creating a new GUI. It seams not so comfortable. 2. If I move all GUI event handling into service, the communication between windows becomes inconvenient. Is there any solution to make it more efficient and logical clear? [ March 26, 2002: Message edited by: Jane Wang ]
posted 14 years ago
What do you mean by UI pages??
" Veni, vidi, vici "<br />" I came, I saw, I conquered "
Jane - While that type of design works for Servlets, it's different for Swing. In Swing all those features are provided, in some other sort of way. The model design for Swing is MVC. This is like the service in that service is a class called a controller. It knows about the GUI, all the actions, and what to do when an action occurs. It is actually a lot more cleaner that Servlets, and their service/getPost etc. Mark