public void loadPatientData(){
        
        PatientLogic myLogicLayer=new PatientLogic();
      List<Patient> patientList=new ArrayList();
      DefaultTableModel patientDataTable=new DefaultTableModel();
      Object[ ] columnNames=new Object[6];
      Object[ ] fieldValues=new Object[6];
      Patient myPatient=null;
      
      try{
         patientList=myLogicLayer.getPatientDetails();
      }
      
      catch(SQLException e){
          System.out.println(e.getMessage());
      }
      
      columnNames[0]="Name";
      columnNames[1]="Age";
      columnNames[2]="ID";
      columnNames[3]="Gender";
      columnNames[4]="Family Name";
      columnNames[5]="Contact No.";
      
      patientDataTable.setColumnIdentifiers(columnNames);
      
      if(patientList.size()>0){
         
          for (Patient patientList1 : patientList) {
              myPatient = patientList1;
              fieldValues[0]=myPatient.getName().toString();
              fieldValues[1]=myPatient.getAge().toString();
              fieldValues[2]=myPatient.getID().toString();
              fieldValues[3]=myPatient.getGender().toString();
              fieldValues[4]=myPatient.getFamilyName().toString();
              fieldValues[5]=myPatient.getContactNo().toString();
              patientDataTable.addRow(fieldValues);
          }
          
          this.View_table.setModel(patientDataTable);
      }
      
    }