60 likes | 154 Vues
Learn about Swing basics, MVC design pattern, publish-subscribe pattern, event listeners, and essential steps for implementing Java projects. Explore how to create new views and controllers and support additional mathematical operations in your application.
E N D
SEng 271 Week 4 Java SWING and Model View Controller (MVC)
Swing Basics • Two design patterns you need to know • MVC • Publish Subscribe
MVC – Model View Controller Controller View Model
Publish Subscribe Object That Implements an Interface • Event Listeners • Lists of Event Listeners
Getting the Code • Download the JAR • Start a new Java Project in Eclipse • Import the JAR by using the “Archive” option in the src folder context menu
Quick Run through of the app • What it does • The three components • The tasks • Implement a new View that provides a visual representation of the result • Implement a new Controller that multiplies instead of adding • Implement a new Controller and a new view that support division (including floating point). Also update the existing views and model to support the new operation.