You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: panel_time.m
    path of file: ./repos/brainstorm3/toolbox/gui
    
    the code of the file until where you have to start completion: function varargout = panel_time(varargin)
% PANEL_TIME: Time window panel.
%
% USAGE:  bstPanel = panel_time('CreatePanel')
%                    panel_time('UpdatePanel')
%         timeUnit = panel_time('GetTimeUnit')
%       T
    
function bstPanelNew = CreatePanel() %#ok<DEFNU>
    panelName = 'Time window';
    % Java initializations
    import java.awt.*;
    import javax.swing.*;

    % Create tool panel
    jPanelNew = gui_river([1,4], [2,2,10,1]);
    jPanelNew.setMinimumSize(java_scaled('dimension', 10, 42));
    % Time labels
    jLabelTime = gui_component('label', jPanelNew, 'hfill', ' ');
    jLabelTime.setPreferredSize(java_scaled('dimension', 10, 42));
    
    % Time: Previous
    gui_component('label', jPanelNew, 'br', ' ');
    jButtonTime(1) = gui_component('button', jPanelNew, '', '<<<', [], [], @(h,ev)TimeKeyCallback('epoch-'));
    jButtonTime(2) = gui_component('button', jPanelNew, '',  '<<', [], [], @(h,ev)TimeKeyCallback('pagedown'));
    jButtonTime(3) = gui_component('button', jPanelNew, '',   '<', [], [], @(h,ev)TimeKeyCallback('leftarrow'));
    % Time: Current
    jTextCurrent = gui_component('texttime', jPanelNew, 'hfill', ' ');
    jTextCurrent.setPreferredSize(java_scaled('dimension', 62, 20));
    jTextCurrent.setHorizontalAlignment(JTextField.RIGHT);
    java_setcb(jTextCurrent, 'FocusLostCallback', @TextValidationCallback, 'ActionPerformedCallback', @TextValidationCallback);
    % Time: Next
    jButtonTime(4) = gui_component('button', jPanelNew, '', '>',   [], [], @(h,ev)TimeKeyCallback('rightarrow'));
    jButtonTime(5) = gui_component('button', jPanelNew, '', '>>',  [], [], @(h,ev)TimeKeyCallback('pageup'));
    jButtonTime(6) = gui_component('button', jPanelNew, '', '>>>', [], [], @(h,ev)TimeKeyCallback('epoch+'));
    gui_component('label', jPanelNew, '', ' ');
    
    % Button size
    jButtonTime(1).setPreferredSize(java_scaled('dimension', 28, 20));
    jButtonTime(2).setPreferredSize(java_scaled('dimension', 24, 20));
    jButtonTime(3).setPreferredSize(java_scaled('dimension', 20, 20));
    jButtonTime(4).setPreferredSize(java_scaled('dimension', 20, 20));
    jButtonTime(5).setPreferredSize(java_scaled('dimension', 24, 20));
    jButtonTime(6).setPreferredSize(java_scaled('dimension', 28, 20));
    % Buttons properties
    for i = 1:length(jButtonTime)
        jButtonTime(i).setBorder([]);
        jButtonTime(i).setMargin(java_scaled('insets', 0, 3, 0, 3));
        jButtonTime(i).setFocusPainted(0);
        java_setcb(jButtonTime(i), 'KeyPressedCallback', @(h,ev)TimeKeyCallback(ev));
    end