def takeTeacherName(teacherName): global table global heading global panel global btnUpdate datas = srv.showSpecificStudentsByTeacher(teacherName) if (datas == False): # some problem to get the data JOptionPane.showMessegeDialog(None, "Failed to get the student list ") elif (datas == None): # means no datas is available JOptionPane.showMessegeDialog(None, "No student has been added ") elif (len(datas) != 0): # means we get some data heading.setText("Student List") panel.add(heading) btnUpdate.setVisible(True) tableModel = MyTableModel3( datas ) # object has been created ,the class is avialable in gui package and in showtable module table.setModel(tableModel) # in table we set the model
def clickShowCourseList(event): global table global heading global panel global btnUpdate datas = srv.showCourseList() if (datas == False): # some problem to get the data JOptionPane.showMessegeDialog(None, "Failed to get the course list ") elif (datas == None): # means no datas is available JOptionPane.showMessegeDialog(None, "No courses has been added ") elif (len(datas) != 0): # means we get some data heading.setText("Course List") panel.add(heading) btnUpdate.setVisible(True) tableModel = MyTableModel1( datas ) # object has been created ,the class is avialable in gui package and in showtable module table.setModel(tableModel) # in table we set the model