private static void updateField() {
		int row = table.getSelectedRow();
		txt_ID.setText((String) table.getValueAt(row, 0));
		txt_taskID.setText((String) table.getValueAt(row, 1));
		txt_emp.setText((String) table.getValueAt(row, 2));
		//txt_Date.setText((String) table.getValueAt(row, 3));
		String dStrCheckin = (String) table.getValueAt(row, 3);
		  DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//MM/dd/yyyy HH:mm:ss
		try {
			
			Date dayCheckin = df.parse(dStrCheckin);
			txt_Date.setDate(dayCheckin);	
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		
		ConnectData ds=new ConnectData();
		ds.connect();			
		String value = null;				
		String ID = (String) table.getValueAt(row,1);				
		String newSQL="SELECT taskName FROM Task where taskID='" + ID +"'"; 

		String value1 = null;				
		String empID = (String) table.getValueAt(row,2);				
		String newSQL1="SELECT empName FROM Employee where empID='" + empID +"'"; 
		
		try { 
			ResultSet rs1 =ds.ExcuteQuery(newSQL1); 						
			if (rs1 != null) {
				value1 = (String)rs1.getString("empName");						
			} 
			rs1.close(); 
			//ds.dispose(); 
		} catch(Exception ex){System.out.println("Error : " + ex);}

		int b=0;
		for (int i=0; i<cb_emp.getItemCount(); i++){
			if(((KeyValue)cb_emp.getItemAt(i)).getValue().equals(value1))
			{
				b=i;
				break;
			}
		}
		cb_emp.setSelectedIndex(b);	
		
		
		try { 
			ResultSet rs =ds.ExcuteQuery(newSQL); 						
			if (rs != null) {
				value = (String)rs.getString("taskName");						
			} 
			rs.close(); ds.dispose(); 
		} catch(Exception ex){System.out.println("Error : " + ex);}

		int a=0;
		for (int i=0; i<cb_task.getItemCount(); i++){
			if(((KeyValue)cb_task.getItemAt(i)).getValue().equals(value))
			{
				a=i;
				break;
			}
		}
		cb_task.setSelectedIndex(a);
		 
		// cb_emp
	}