|
Re: Jbutton model or view controller in mvc
|
Posted: Aug 24, 2006 11:57 PM
|
|
> I would like to know that jbutton is consider as a model > or a view,controller in mvc architecture.if its only view > controller how?.or if its only model means how?.or its > model,view and controller means how?..plz explain
Its a Swing component it encpsulates all of the above.
The class has a method (via inheritance from AbstractButton) addActionListener, which is an example of the Controller.
The JButton itself is a JComponent (View). Things like setText(String) and getText() provide access to data objects on the Component (The Model).
Thats my current understanding of it, if I have this twisted could someone please correct me?
|
|