Designing a Swing GUI
by, 04-26-2012 at 07:47 PM (1012 Views)
For simpler GUI designs, discussed above MVC widget internals could be ignored. Widget placement can be approached in GUI along with Swing similarly as AWT: by widgetís instantiation and their addition to the containers. In addition to this, MVC is used by two techniques for designing powerful and flexible GUIs.
- Simpler GUI Design: Widgets are instantiated and added to container. Then selection of Look & Feel is done for whole GUI.
- Complex GUI Design: Though Swing directly donít address this particular point, widgets may do interaction in framework of MVC. By making reponse to the user inputs and altering the data model, one widget might perform to be a controller. Then, it changes are transferred to other widgets which act as view.
- Complex Widget Architecture: Few Swing widgets like JTree, JList , and other text widgets are powerful in case when model as well as delegateís part is specified by the programmer. In a JList widget, line item object groups are presented this way.