protected void setWebComponents() {
    super.setWebComponents();
    stats = W4TContext.getStatistics(false);

    wplCenterBorder.add(createHeadLinePanel(), WebBorderLayout.CENTER);
    wplCenterBorder.add(createWplComponentTable(), WebBorderLayout.CENTER);

    wplCenterBorder.add(
        createInfoPanel("<br>" + stats.getSessionCountText()), WebBorderLayout.CENTER);
    wplCenterBorder.add(createInfoPanel(stats.getApplicationUptimeText()), WebBorderLayout.CENTER);
    wplCenterBorder.add(createInfoPanel(stats.getOccupiedMemoryKBText()), WebBorderLayout.CENTER);
    wplCenterBorder.add(createInfoPanel(stats.getStatisticsTimeText()), WebBorderLayout.CENTER);

    initRefreshButton();
    initSeparator();
    initGCButton();
  }
  /** creates a panel that contains a table with the components counts from the registry. */
  private WebPanel createWplComponentTable() {
    // get the data and init the grid
    WebPanel wplComponentTable = new WebPanel();
    String[] componentCounts = stats.getComponentCountsText();
    int size = componentCounts.length;
    WebGridLayout wglComponentTable = new WebGridLayout(size + 1, 2);
    wplComponentTable.setWebLayout(wglComponentTable);

    // the counts for the various types of components
    for (int i = 0; i < size - 1; i++) {
      int colonIndex = componentCounts[i].indexOf(":");
      int rowNumber = i + 1;
      Area area = wglComponentTable.getArea(new Position(rowNumber, 1));
      area.setAlign("right");
      String numComponents = componentCounts[i].substring(0, colonIndex);
      WebLabel wlbNumComponents = new WebLabel(numComponents.trim());
      wplComponentTable.add(wlbNumComponents, new Position(rowNumber, 1));
      String cmpName = componentCounts[i].substring(colonIndex + 1).trim();
      String nameComponent = "<code>&nbsp;" + cmpName + "</code><br>";
      MarkupEmbedder wlbNameComponent = new MarkupEmbedder(nameComponent);
      wplComponentTable.add(wlbNameComponent, new Position(rowNumber, 2));
    }

    // an empty row
    Position pos = new Position(size, 1);
    ((WebTableCell) wglComponentTable.getArea(pos)).setColspan("2");
    MarkupEmbedder wlbNbsp = new MarkupEmbedder(HTML.NBSP);
    wplComponentTable.add(wlbNbsp, pos);

    // the count for all components altogether
    pos = new Position(size + 1, 1);
    wglComponentTable.getArea(pos).setAlign("right");
    String compAltogether = String.valueOf(stats.getComponentCountAltogetherText());
    int colonIndex = compAltogether.indexOf(":");
    String compCount = "<code>" + compAltogether.substring(0, colonIndex) + "</code>";
    MarkupEmbedder wlbNumAltogether = new MarkupEmbedder(compCount);
    wplComponentTable.add(wlbNumAltogether, pos);
    MarkupEmbedder wlbAltogether =
        new MarkupEmbedder("&nbsp;Components altogether in the registry.");
    wplComponentTable.add(wlbAltogether, new Position(size + 1, 2));
    return wplComponentTable;
  }
  private WebPanel createHeadLinePanel() {
    WebPanel wplHeadLine = new WebPanel();

    WebFlowLayout wflHeadLine = (WebFlowLayout) wplHeadLine.getWebLayout();
    wflHeadLine.getArea().setAlign("left");
    String headline =
        "<br><b>&nbsp;WebComponentStatistics</b> " + stats.getCreationTime() + "<br><hr>";
    MarkupEmbedder wlbHeadline = new MarkupEmbedder(headline);
    wplHeadLine.add(wlbHeadline);

    return wplHeadLine;
  }