How to use a component in an application?

Application Java code

package thintable.client;

import thinlet.FrameLauncher;
import xthinlet.XThinlet;


/**
 @author Koen Roevens
 */
public class TableBrowser extends XThinlet {
  static {
    try {
      Class.forName("ui.component.menu.RegisterMenu");
      Class.forName("ui.component.tool.navigate.RegisterToolbar");
      Class.forName("ui.component.selector.RegisterSelector");
      Class.forName("ui.component.table.RegisterTable");
    catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
  
    private String name;
    
  public TableBrowser() throws Exception{
    super();
    add(parse("browser.xml"));
  }  
  
  public static void main(String[] argsthrows Exception {
    new FrameLauncher("TableBrowser"new TableBrowser()600300);
  }

  /**
   * Listener method
   */
  public void showTable(String name) {
    Object dataset = find("dataset");
    removeAll(find("dataset"));
    this.name = name;
    Object toolbar = find("tools");
    
    this.putProperty(dataset, "table", name);
    this.putProperty(dataset, "index", Integer.toString(1));
    this.putProperty(dataset, "interval", getProperty(toolbar,"interval"));
    getComponentContainer().addComponent("table", this, dataset);
    this.putProperty(toolbar, "index", Integer.toString(1));
    this.putProperty(toolbar, "total"this.getProperty(dataset,"total"));
    getComponentContainer().refreshComponent("tools");
    }

  /**
   * Listener method
   */
    public void refreshTable(String index, String interval ) {
    Object dataset = find("dataset");
    removeAll(dataset);
    this.setString(dataset, "table", name);
    this.setString(dataset, "index", index);
    this.setString(dataset, "interval", interval);
    getComponentContainer().addComponent("table", this, dataset);
    }
}

Java2html

Xml for the application

<?xml version="1.0" encoding="ISO-8859-1"?>
<panel name="canvas" columns="1">
<menu weightx="1" description="Table browser powered by Thinlet" author="Koen Roevens" email="xyz@users.sourceforge.net"/>
  <toolbar name="tools" gap="1" top="1" bottom="1"
             index="1" interval="10" total="0" action="refreshTable(this.index,this.interval)"/>
  <splitpane divider="250" orientation="vertical" weightx="1" weighty="1" name="divider_y">
    <splitpane divider="150" name="divider_x" orientation="horizontal">
      <selector name="tables" action="showTable(item.text)"/>
      <table name="dataset" selection="single"/>
    </splitpane>
    <!-- ToDo Add Form -->
  </splitpane>
</panel>

The running Application