“Hello, World!”
This example shows how to put a static text label inside a window.
Layout Manager with Constraints
This example shows how to put components inside a container, subject to layout constraints.

The constraints are used by the container’s layout manager to determine the placement and size of each component.
A Simple View Hierarchy
This example shows how to describe a simple view hierarchy.

The example shows how to arrange sliders and labels using one layout manager, and embed the composite in a higher level view using another layout manager.
List with Multiple Selections
This example shows how to describe a list inside a scroll pane.

List data may be specified inline, along with the markup for a list element, or it may be specified inside a separate listModel element. A list element refers to a listModel element through a universal resource indicator (URI).

Yet another possibility is to populate the list model at run time through a user-defined class specified as an attribute of the listModel element.
Translucency and Transparency
This example shows how to exploit translucency and transparency to implement image backgrounds. It also shows that components at different levels in the view hierarchy can use different degrees of translucency.
Compound Borders
This example shows how to build compound borders and associate them with arbitrary presentation components. It shows how to build a matte border using a tiled icon, compound it with a bevel border, and associate the compound border with a text area.
Radio Button Group
This example shows how to impart mutually exclusive behavior to radio buttons by adding them to a button group — in addition to their usual placement inside a view container. Find out how you can describe the containment of the same object in two different parents using reference element types.
Form
This example shows how to build a form using standard presentation element types.

A new form element type capable of describing multi-part forms will be available later.
Interfacing with Java™ technology
This example shows how markup elements can interface with user-defined JavaBeans™ classes. The label element in this example gets part of its data from a Java class at run time.
Event Listeners
This example shows how to associate user-defined event listeners to event sources.

The example shows how to associate an item listener to a combo box to respond to item events as a user browses through items in the combo box. Here, the item listener flips through the cards in the middle panel.
Menus, Toolbars, and Shared Actions
This example shows how to describe menus and toolbars.

The example shows how to attach actions to menu items and tool bar buttons.

Among other things, it also shows how to share a single action between both a menu item and a tool bar button, and how to use trampolines to add a level of indirection while handling action events.
Model-View-Controller Pattern
This example shows how to describe a numeric spinner using the model-view-controller pattern.

The view portion of this example is straightforward, but the model and controller portions require an understanding of Java interfaces and reflection.
Advanced Object Composition
This example shows how to describe sophisticated components by combining many of the techniques introduced throughout the tutorial.

The result is a fully functioning calendar.
Markup Magic!
This example shows how the presentation of complex components can be radically altered using just markup.

As long as the programmatic interface to models and controllers are well defined, web designers have a great deal of freedom to express their creativity using markup, without changing a single line of Java code!
Web Services Integration
This example shows how to describe progressively richer applications by assimilating elemental web services to form composite applications.

Among other things, it shows how to wrap SOAP-based web services into objects than can be easily configured and integrated with user interface markup as well as with traditional HTML-based web sites.

It also shows how objects can be structured so that they are amenable to dynamic object composition, allowing service distributors and service aggregators to alter the mix of services, or change the service provider or user interface for a service to meet users’ needs.
A New Kind of Middleware for a New Kind of Web

Copyright © 2002 eNode, Inc. All Rights Reserved.