Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What's the best way to decouple View from Controller, in Swing?  RSS feed

 
Jane Jukowsky
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've seen such attempts, but they were kinda clumsy. Perhaps the only instance of View decoupled from Controller that I know of is XML-based gui; that's pure M-V-C, can't argue with that, but somehow the idea of manually coding all event listeners does not appeal to me. Thoughts?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jane Dodo wrote:but somehow the idea of manually coding all event listeners does not appeal to me. Thoughts?


Compared to? How are you wiring up events now?
 
Jane Jukowsky
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use a WYSIWIG tool; Instantiation is my favorite, with Matisse being a runner-up. Good question though! Do you code by hand?
 
VarunKumar Mallisetty
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have a look at jgoodies' binding project at java.net. It strives for clear separation of model and view.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!