Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A Complex Demo in Swing with MVC  RSS feed

 
Himanshu S. Soni
Greenhorn
Posts: 26
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have recently picked up application development in SWING. I have developed a couple of applications which use various components of the swing framework. But i haven't found an efficient way to structure the code in my application. I am confused as how to implement MVC for my apps. Besides this, a complex app will help me analyze the structure of the app as how the various components are coupled together.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question, as you have posted, is too vague to be answered on forums. You will need to be very specific in terms of where you are stuck.

As a rule of the thumb, you got data coming in from somewhere. Shape it into a model which the existing Swing component understands. e.g. A DefaultTableModel needs to provide (at a minimum) the following to the JTable
row count
column count
column names
data per cell
So your custom model will need to figure these out from the data values you pump in.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!