Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
Training Index

Writing Advanced Applications
Chapter 6: Project Swing: Building a User Interface

[<<BACK] [CONTENTS] [NEXT>>]

The JavaTM Foundation Classes (JFC) Project Swing and Enterprise JavaBeansTM architectures share one key design element: the separation of data from the display or manipulation of that data. In Enterprise JavaBeans applications, the entity bean provides a view of the data. The underlying data storage mechanism can be swapped out and replaced without changing the entity bean view or recompiling any code that uses the view.

Project Swing separates the view and control of a visual component from its contents, or data model. However, although Project Swing does have the components that make up a Model-View-Controller (MVC) architecture, it is more accurately described as a model-delegate architecture. This is because the controller part of the Project Swing interface, often the mouse and keyboard events the component responds to, is combined with the physical view in one User Interface delegate (UI delegate) object.

Each component, for example a JButton or a JScrollBar, has a separate UI delegate class that inherits from the ComponentUI class and is under the control of a separate UI manager. While each component has a basic UI delegate, it is no longer tied to the underlying data so a new set of delegets -- a set of metal-styled components, for example -- can be swapped in while the application is still running. The ability to change the look and behavior reflects the pluggable look and feel (PLAF) feature available in Project Swing.

This chapter describes Project Swing user interface components in terms of the AuctionClient example application.


In a Rush?

This table links you directly to specific topics.

Topic Section
Components and Data Models

[TOP]


[ This page was updated: 13-Oct-99 ]

Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-99 Sun Microsystems, Inc.
All Rights Reserved. Legal Terms. Privacy Policy.