Why is Model-View-Controller Architecture used in Swing?

Answer

Model-View-Controller Architecture is used to show the design of the components that are made up of three elements and these elements show the behavior of components as:
• Model: it consists of the state of individual component. Different models are used for different components for example scrollbar component that consists of the information used to display the current position and the values that are associated with it. Menu, can consists of a simple list containing the menu items that user can select and take actions on. This information doesn't change from component to component and it remains the same in every case. The model remains independent of the visual representation of the component.
• View: it defines the visual representation of the component. The view differs from one window to another window. The application can consist of different user interface platforms and specifications. It consists of all the components related to the visual appearance. It deals with different views of a particular component.
• Controller: provides the way to control the relationship between the model and the view and it allows the interaction to be done with the events. The events can have many forms like mouse click, having focus on some button or some kind of triggers that are on some menu, etc. This is the controller that decides the component that is to be used to react to an event.

All swing Questions

Ask your interview questions on swing

Write Your comment or Questions if you want the answers on swing from swing Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---