免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
MVC example
- [Instructor] An MVC example. Remember, MVC stands for model-view-controller. Now that you have a better understanding of how to use Swing with Java, let's take a look at how the new GUI components can be populated or information captured from the user in an MVC environment. This is a very simple MVC, starting with a splash page used as a starting point to then transfer control to the first controller. That presents the view using the model provided. Let's real quick start with, what are the files that I have inside this project? So as I stated, we have the model package here, and that contains the model of computer parts. This is a class that allows me to create a computer parts object that will have information about a processor, a monitor, a keyboard, and a mouse, and you can see, really, all it has is the data definition as well as the getters and setters for every field. Under the view is where we have the splash screen, which is very simple. I'll just show you that, just a…