Design Pattern Architecture


The primary design pattern is the Model-View-Controller (MVC) pattern. For example, the JTable component uses the MVC: The grid that appears onscreen is the View portion, the table model where the data is stored is the Model portion, and the code you write to manipulate the component and model and respond to user input is the Controller portion.

The next most common pattern you find in Swing components is the Observer-Observable pattern. You will recognize this pattern in how most components handle events. For example, when a user presses a JButton , an ActionEvent event is fired and then handled by the ActionListener assigned to the button.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net