import javax.swing.*;
public class TMMonitorFactory implements UIFactory {
public JComponent create(UI ui, Element e) {
try {
TransactionManager tm =
(TransactionManager) NameRegistrar.get (e.getAttributeValue ("transaction-manager"));
return new TMMonitor (ui, tm);
} catch (NameRegistrar.NotFoundException ex) {
return new JTextArea (ex.toString());
}