private void initComponent() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 536, 430);
		
		ChangeListener changeListener = new ChangeListener() {
		      public void stateChanged(ChangeEvent changeEvent) {
		        JTabbedPane sourceTabbedPane = (JTabbedPane) changeEvent.getSource();
		        int index = sourceTabbedPane.getSelectedIndex();
		        Component comp = null;
		        if(index >= 0)
		        {
		        	comp = sourceTabbedPane.getComponentAt(index);
		        }
		        else
		        {
		        	comp = MainFrame.this;
		        }
		        reBuildJToolBar(comp);
		      }
		    };
		
		
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JMenu mnFile = new JMenu("File");
		menuBar.add(mnFile);
		
		JMenuItem mntmExit = new JMenuItem("Exit");
		mnFile.add(mntmExit);
		
		JMenu mnGridview = new JMenu("GridView");
		menuBar.add(mnGridview);
		
		JMenuItem mntmGroups = new JMenuItem("Groups");
		mntmGroups.setIcon(StaticRes.GROUP_ICON);
		mntmGroups.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	if(!checkExistingTab(GroupsGrid.class.getName()))
            	{
            		createTabButtonActionPerformed(evt, new GroupsGrid(), "Groups", StaticRes.GROUP_ICON);
            	}
            }
        });
		mnGridview.add(mntmGroups);
		
		JMenuItem mntmRooms = new JMenuItem("Classes");
		mntmRooms.setIcon(StaticRes.CLASS_ICON);
		mntmRooms.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	if(!checkExistingTab(RoomsGrid.class.getName()))
            	{
            		createTabButtonActionPerformed(evt, new RoomsGrid(), "Classes", StaticRes.CLASS_ICON);
            	}
            }
        });
		mnGridview.add(mntmRooms);
		
		JMenuItem mntmTeachers = new JMenuItem("Teachers");
		mntmTeachers.setIcon(StaticRes.TEACHER_ICON);
		mnGridview.add(mntmTeachers);
		
		JMenuItem mntmSchedule = new JMenuItem("Schedule");
		mntmSchedule.setIcon(StaticRes.SCHEDULE_ICON);
		mntmSchedule.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	if(!checkExistingTab(ScheduleGrid.class.getName()))
            	{
            		createTabButtonActionPerformed(evt, new ScheduleGrid(MainFrame.this), "Schedule", StaticRes.SCHEDULE_ICON);
            	}
            }
        });
		mnGridview.add(mntmSchedule);
		
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		//JPanel panel = new JPanel();
		//contentPane.add(panel, BorderLayout.NORTH);
		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		
		tabbedPane.addChangeListener(changeListener);
		contentPane.add(tabbedPane, BorderLayout.CENTER);
				
		toolBar = new JPanel();
		FlowLayout flowLayout = (FlowLayout) toolBar.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		contentPane.add(toolBar, BorderLayout.NORTH);
		setToolBar();
		toolBar.add(this.toolBarPanel);
	}