function charpnl(h,f)

%% Build annoation panel
h.Handles.PNLAnnoation = uipanel('Parent',f,'Units','Pixels','Title', ...
    'Define Annotations');
h.chartable
set(h.Handles.PNLannotationTable,'Units','Pixels','Parent',h.Handles.PNLAnnoation)
set(h.Handles.PNLAnnoation,'ResizeFcn',{@PNLannotationTableResize h.Handles.PNLannotationTable})
PNLannotationTableResize(h.Handles.PNLAnnoation,[],h.Handles.PNLannotationTable)


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Resize functions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function PNLannotationTableResize(es,ed,PNLannotationTable)

%% Resize fcn for the annoations panel 

%% Table to take up all space - margins
margin = 10;
pos = get(es,'Position');
set(PNLannotationTable,'Position', ...
    [margin margin max(1,pos(3)-2*margin pos(4)-3*margin]))