MVC pattern in Java swing?

Please give an example of the MVC pattern used in the Java Swing package?

Solution

Basically, the swing component itself is a controller with references to views and models

The view is located at JComponent UI field is inherited by all swing components and used by look & feel mechanism to provide different visual representations of swing components

There are different setmodel () methods in various subclasses. They use different model types, such as tablemodel or buttonmodel. Application programmers can implement these methods to contain the actual data displayed and operated by swing UI

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>