private void initContent() {
		setBounds(100, 100, 450, 306);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);
		
		lblName = new JLabel("Name:");
		lblName.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblName.setBounds(21, 22, 86, 20);
		contentPanel.add(lblName);
		
		lblLevel = new JLabel("Level:");
		lblLevel.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblLevel.setBounds(21, 51, 86, 20);
		contentPanel.add(lblLevel);
		{
			lblCapacity = new JLabel("Capacity:");
			lblCapacity.setFont(new Font("Tahoma", Font.PLAIN, 14));
			lblCapacity.setBounds(21, 82, 86, 20);
			contentPanel.add(lblCapacity);
		}
		{
			lblStudentAge = new JLabel("Student Age:");
			lblStudentAge.setFont(new Font("Tahoma", Font.PLAIN, 14));
			lblStudentAge.setBounds(21, 113, 86, 20);
			contentPanel.add(lblStudentAge);
		}
		{
			lblTeacher = new JLabel("Teacher(s):");
			lblTeacher.setFont(new Font("Tahoma", Font.PLAIN, 14));
			lblTeacher.setBounds(21, 144, 86, 20);
			contentPanel.add(lblTeacher);
		}
		{
			panel_1 = new JPanel();
			panel_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Schedule", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
			panel_1.setBounds(277, 6, 155, 158);
			contentPanel.add(panel_1);
			panel_1.setLayout(null);
			
			JButton btnAdd = new JButton("Add");
			btnAdd.setFocusTraversalKeysEnabled(false);
			btnAdd.setFocusable(false);
			btnAdd.setFocusPainted(false);
			btnAdd.setPreferredSize(new Dimension(30, 23));
			btnAdd.setMargin(new Insets(2, 2, 2, 2));
			btnAdd.setMaximumSize(new Dimension(40, 23));
			btnAdd.setMinimumSize(new Dimension(30, 23));
			btnAdd.setAlignmentX(Component.CENTER_ALIGNMENT);
			btnAdd.setBounds(10, 13, 67, 23);
			btnAdd.setIcon(StaticRes.ADD16_ICON);
			btnAdd.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	            	ScheduleSelectDialog ssd;
					try {
						Group_schedule group_schedule = new Group_schedule();
						group_schedule.setGroup(group.getId());
						ssd = new ScheduleSelectDialog(null, "Schedule for " + group.getName(), ModalityType.DOCUMENT_MODAL, GroupsDialog.this, group_schedule);
						ssd.setVisible(true);
					} catch (ClassNotFoundException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
	            }
	        });
			panel_1.add(btnAdd);
			
			DefaultListModel listModel = new DefaultListModel();

			for(Group_schedule obj : this.schedule_list)
			{
				listModel.addElement(obj);
//				if(!teacher_list.contains(obj.getTeacher().getName()))
//				{
//					teacher_list.add(obj.getTeacher().getName());
//				}
			}
			list = new JList(listModel);
			list.setVisibleRowCount(5);
			list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
			list.setCellRenderer(new ListCellRenderer() {
				
				protected DefaultListCellRenderer defaultRenderer = new DefaultListCellRenderer();
				@Override
				public Component getListCellRendererComponent(JList list, Object o,
						int i, boolean selected, boolean cellHasFocus) {
					// TODO Auto-generated method stub
					
					//JLabel label = new JLabel();
					JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent(list, o, i,
							selected, cellHasFocus);
					
					Group_schedule gschedule = (Group_schedule) o;
	                label.setText(gschedule.getName());
	                
	                return label;
				}
			});
			list.setBounds(10, 40, 135, 107);
			panel_1.add(list);
			
			JButton btnRemove = new JButton("Remove");
			btnRemove.setBounds(78, 13, 67, 23);
			btnRemove.setFocusTraversalKeysEnabled(false);
			btnRemove.setFocusable(false);
			btnRemove.setFocusPainted(false);
			btnRemove.setPreferredSize(new Dimension(30, 23));
			btnRemove.setMargin(new Insets(2, 2, 2, 2));
			btnRemove.setMaximumSize(new Dimension(40, 23));
			btnRemove.setMinimumSize(new Dimension(30, 23));
			btnRemove.setAlignmentX(Component.CENTER_ALIGNMENT);
			btnRemove.setIcon(StaticRes.DELETE16_ICON);
			btnRemove.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	            	int index = list.getSelectedIndex();
	            	Group_schedule gschedule = (Group_schedule)list.getSelectedValue();
	            	if(index >= 0)
	            	{
	            		((DefaultListModel) list.getModel()).removeElement(gschedule);
	            		lblDispTeacher.setText(getTeacher(getTeacherFromList()));
	            	}
	            }
	        });
			panel_1.add(btnRemove);
		}
		
		txtName = new JTextField();
		txtName.setBounds(117, 24, 150, 20);
		txtName.setText(this.name);
		contentPanel.add(txtName);
		txtName.setColumns(10);
		{
			txtCapacity = new JTextField();
			txtCapacity.setColumns(10);
			txtCapacity.setText(String.valueOf(this.capacity));
			txtCapacity.setBounds(117, 84, 150, 20);
			txtCapacity.addKeyListener(new KeyAdapter()
			{
			public void keyTyped(KeyEvent ke)
			{
				char c = ke.getKeyChar();
				if (!Character.isDigit(c))
				ke.consume(); // prevent event propagation
			}
			}); 
			contentPanel.add(txtCapacity);
		}

			LevelDAO lDAO = new LevelDAO(db.connection);
			cbLevel = new JComboBox();
			//cbLevel.setBorder(BorderFactory.createMatteBorder(0,0,1,1,Color.BLACK));
			if(this.level_id < 1)
			{
				Level l = new Level();
				l.setName("Select level");
				l.setId(0);
				cbLevel.addItem(l);
			}
			List<Level> levelList = lDAO.getLevelList();
			for(Level level : levelList)
			{
				cbLevel.addItem( level );
				if(level.getId() == this.level_id)
				{
					cbLevel.setSelectedItem( level );
				}
			}
			cbLevel.setRenderer(new ComboBoxRenderer());
			cbLevel.setBounds(117, 53, 150, 20);
			contentPanel.add(cbLevel);
		
		
		
		cbStudentAge = new JComboBox();
		cbStudentAge.setBounds(117, 115, 150, 20);
		contentPanel.add(cbStudentAge);
		
		lblDispTeacher = new JLabel(getTeacher(getTeacherFromList()));
		lblDispTeacher.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblDispTeacher.setBounds(117, 144, 150, 20);
		contentPanel.add(lblDispTeacher);
		
//		TeacherDAO tDAO = new TeacherDAO(db.connection);
//		cbTeacher = new JComboBox();
//		if(this.teacher_id < 1)
//		{
//			Teacher t = new Teacher();
//			t.setName("Select teacher");
//			t.setId(0);
//			cbTeacher.addItem(t);
//		}
//		List<Teacher> teacherList = tDAO.getTeachersList();
//		for(Teacher teacher : teacherList)
//		{
//			cbTeacher.addItem( teacher );
//			if(teacher.getId() == this.teacher_id)
//			{
//				cbTeacher.setSelectedItem( teacher );
//			}
//		}
//		cbTeacher.setRenderer(new ComboBoxRenderer());
//		cbTeacher.setBounds(117, 146, 150, 20);
//		contentPanel.add(cbTeacher);
		{
			panel = new JPanel();
			panel.setBorder(UIManager.getBorder("MenuBar.border"));
			FlowLayout flowLayout = (FlowLayout) panel.getLayout();
			flowLayout.setAlignment(FlowLayout.LEFT);
			getContentPane().add(panel, BorderLayout.NORTH);
			{
				lblGroup = new JLabel("Group");
				lblGroup.setFont(new Font("Tahoma", Font.PLAIN, 18));
				lblGroup.setIcon(StaticRes.GROUP48_ICON);
				panel.add(lblGroup);
			}
		}
						
		
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setIcon(StaticRes.OK_ICON);
				okButton.setActionCommand("OK");
				okButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						System.out.println("OK Clicked!");
						//fillGroup();
						if(checkAndSaveGroup())
						{
							dispose();
							result.returnObject(GroupsDialog.this.group);
						}else{
							//AboutDialog dlg = new AboutDialog(null, "Error", "Error");
						}
						
					}
				});
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				cancelButton.setIcon(StaticRes.CANCEL_ICON);
				cancelButton.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						System.out.println("Cancel Clicked!");
						dispose();
					}
				});
				buttonPane.add(cancelButton);
			}
		}
	}