http://cookxml.sf.net/common/

Tag <object>

Class

Object

This tag is use to create a new instance of arbitrary classes that has a default constructor. The class is then looked up using a ClassLoader. By default, the class loader to be used is the system class loader.

Example: creates a JPanel object.

     <object ctor="javax.swing.JPanel"/>
 
With the cookxml library (namespace http://cookxml.sf.net/) inherited as the parent library of the common library, the default singleton library, one can "cast" the tag to a new tag to that meaningful things can be done.

Example: creates a custom JPanel object, and cast it to "panel" tag, then changes its background color to Blue. This example uses CookSwing tag library (namespace http://cookxml.sf.net/cookswing/) which uses the common tag library.

     <object ctor="foo.MyPanel" tag="panel" background="blue"/>
 

Attribute Summary
Attribute Type Description
ctor Specifies the full class name.