function tstable(h,varargin)

import javax.swing.*;

%% Method which builds/populates the timeseries table on the viewcontainer panel

if isempty(h.Handles) || isempty(h.Handles.PNLTs) || ...
        ~ishandle(h.Handles.PNLTs)
    return % No panel
end

%% Get the valid nodes - if necessary excluding the node being deleted
tsnodes = h.getChildren;
if nargin>=2 && ~isempty(varargin{1})
    tsnodes = setdiff(tsnodes,varargin{1});
end

%% Assemble the timeseries table data by traversing each member timeseries
tableData = cell([length(tsnodes),4]);
for k=1:length(tsnodes)
    tableData(k,:) = {tsnodes(k).Label, tsnodes(k).Timeseries.TimeInfo.Start, ...
        tsnodes(k).Timeseries.TimeInfo.End, tsnodes(k).Timeseries.TimeInfo.Units};
end
    
%% Populate the table - if necessary creating it
if ~isfield(h.Handles,'tsTable') || isempty(h.Handles.tsTable)
    headings = {'Time Series','Start Time','End Time','Time Units'}; 
    % Parent figure passed as the first argument until uitables can
    % be parented directly to uipanels
    [h.Handles.tsTable, h.Handles.PNLtsTable] = ...
        tsuitable(ancestor(h.Handles.PNLTs,'figure'),'Position',[0 0 1 1]);
    tsCustomizeUitable(h.Handles.tsTable)
    set(h.Handles.tsTable,'Visible',false)
    h.Handles.tsTable.setData(tableData);
    h.Handles.tsTable.setColumnNames(headings);
    h.Handles.tsTable.Editable = false;
     
    % Row selection only
    awtinvoke(h.Handles.tsTable.getTable,'setSelectionMode(I)',...
        ListSelectionModel.SINGLE_SELECTION);
    awtinvoke(h.Handles.tsTable.getTable,'setCellSelectionEnabled(Z)',false);
    awtinvoke(h.Handles.tsTable.getTable,'setRowSelectionAllowed(Z)',true);
    
    %% Pack the table
    awtinvoke(h.Handles.tsTable.getTable,'setAutoResizeMode(I)',...
        JTable.AUTO_RESIZE_ALL_COLUMNS)
    
else
    h.Handles.tsTable.setData(tableData);
end


