function initialize(h,host,cmenu)

import com.mathworks.toolbox.timeseries.*;
import java.awt.dnd.*
import javax.swing.*;

%% Create table view. Parent figure passed as the first argument until
%% uitables can be parented directly to uipanels
[h.Table, h.TablePanel] =  tsuitable(ancestor(host,'figure'),'Position',[0 0 1 1]);

%% Customize the table model to allow non-editable event rows
customTableModel = tsuitableModel(h.Table.getTableModel,[]);
awtinvoke(h.Table.getTable,'setModel',customTableModel);
awtinvoke(h.Table.getTable,'setSelectionModel(Ljavax/swing/ListSelectionModel;)',...
    tsuitableListSelectionModel(customTableModel) );

%% Don't show the table. Note the units must be pixels
set(h.TablePanel,'Parent',host,'Visible','off','Units','Pixels');

%% Do not show row headers
set(h.Table.TableScrollPane.getRowHeader,'Visible','off')

%% Custom render for showing events in the first column
colclass = h.Table.getTable.getColumnClass(0);
awtinvoke(h.Table.getTable,...
    'setDefaultRenderer(Ljava/lang/Class;Ljavax/swing/table/TableCellRenderer;)',...
    colclass,tsviewRenderer);
