    tmp_fig=gcf;

    % Frame
    uicontrol(tmp_fig,...
        'Style','frame',...
        'Background','B',...
        'Position',[25,17,min(max(k_states,k_params),5)*90+10,172]);

    %*********************************
    % State Data Display
    %*********************************
    % Define state slider
    display_length=min(k_states,5);

    sli_states=uicontrol(tmp_fig,...
        'Style','slider',...
        'Position',[30,40,display_length*90,15],...
        'Min',1,'Max',k_states,'Value',1,...
        'Callback','lfsetsta');

    CurrentState=max([1,round(get(sli_states,'Value'))]);

    % State slider text
    uicontrol(tmp_fig,...
        'Style','text',...
        'Position',[30,23,25,12],...
        'String','1');
    uicontrol(tmp_fig,...
        'Style','text',...
        'Position',[5+display_length*90,23,25,12],...
        'String',num2str(k_states));
    uicontrol(tmp_fig,...
        'Style','text',...
        'Position',[display_length*45-15,22,100,15],...
        'BackgroundColor','Y',...
        'String','State Values');

    for i=1:display_length,
        StateLabel(i)=uicontrol(tmp_fig,...
            'Style','text',...
            'Position',[30+(i-1)*90,80,90,18],...
            'HorizontalAlignment','Center',...
            'String',statename(max(CurrentState-5,0)+i,:));
         
        StateValue(i)=uicontrol(tmp_fig,...
            'Style','edit',...
            'Position',[30+(i-1)*90,60,90,18],...
            'HorizontalAlignment','Center',...
            'String',num2str(x(max(CurrentState-5,0)+i)),...
            'Callback','lfstatup');
    end

    %*********************************
    % Parameter Data Display
    %*********************************
    % Define parameter slider
    display_length=min(k_params,5);
    sli_params=uicontrol(tmp_fig,...
        'Style','slider',...
        'Position',[30,125,display_length*90,15],...
        'Min',1,'Max',k_params,'Value',1,...
        'Callback','lfsetpar');

    CurrentParam=max([1,round(get(sli_params,'Value'))]);

    % Parameter slider text
    uicontrol(tmp_fig,...
        'Style','text',...
        'Position',[30,108,25,12],...
        'String','1');
    uicontrol(tmp_fig,...
        'Style','text',...
        'Position',[5+display_length*90,108,25,12],...
        'String',num2str(k_params));

    for i=1:display_length,
        ParamLabel(i)=uicontrol(tmp_fig,...
            'Style','text',...
            'Position',[30+(i-1)*90,165,90,18],...
            'HorizontalAlignment','Center',...
            'String',paramname(max(CurrentParam-5,0)+i,:));

        ParamValue(i)=uicontrol(tmp_fig,...
            'Style','edit',...
            'Position',[30+(i-1)*90,145,90,18],...
            'HorizontalAlignment','Right',...
            'String',num2str(param(max(CurrentParam-5,0)+i)),...
            'Callback','lfparupd');
    end
