def studentLogined(stObj): global panel global table global heading global frame frame = JFrame("Student Page ") frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) frame.setSize(500, 600) frame.setLocation(200, 200) frame.setLayout(None) panel = JPanel() panel.setSize(500, 580) panel.setLocation(0, 20) panel.setLayout(None) panel.setVisible(True) panel.setBackground(Color.WHITE) heading = JLabel() heading.setBounds(210, 10, 200, 30) table = JTable() table.setBounds(0, 50, 500, 470) sp = JScrollPane(table, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS) bar = JMenuBar() profile = JMenu("Profile") showProfile = JMenuItem("Show Profile", actionPerformed=clickShowStudentProfile) changePassword = JMenuItem("Change Password", actionPerformed=changeStudentPassword) profile.add(showProfile) profile.add(changePassword) bar.add(profile) attendence = JMenu("Attendence") showAllAttendence = JMenuItem("Show All Attendence", actionPerformed=clickAllAttendence) showAttendenceInMonth = JMenuItem("show attendence in month", actionPerformed=clickAttendenceInMonth) attendence.add(showAllAttendence) attendence.add(showAttendenceInMonth) bar.add(attendence) logout = JMenuItem("logout", actionPerformed=clickLogout) bar.add(logout) panel.add(table) frame.setJMenuBar(bar) frame.add(panel) frame.setVisible(True)
def showAttendenceSheet(): global table global heading global frame global panel global btnSave global btnCancel frame = JFrame("Teacher Attendence Sheet ") frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) frame.setSize(500, 600) frame.setLocation(200, 200) frame.setLayout(None) frame.setVisible(True) panel = JPanel() panel.setSize(500, 600) panel.setLocation(0, 0) panel.setLayout(None) panel.setVisible(True) panel.setBackground(Color.WHITE) heading = JLabel() heading.setBounds(200, 10, 150, 30) table = JTable() table.setBounds(0, 50, 500, 450) panel.add(table) btnSave = JButton("Save", actionPerformed=clickSaveBtn) btnCancel = JButton("Cancel", actionPerformed=clickCancelBtn) btnSave.setBounds(350, 540, 100, 40) btnCancel.setBounds(70, 540, 100, 40) panel.add(heading) panel.add(table) panel.add(btnSave) panel.add(btnCancel) frame.add(panel)
def showStudentAttendenceSheetAdminLogined(): global table global heading global frame global panel global btnok frame = JFrame("Student Attendence Sheet ") frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) frame.setSize(500, 600) frame.setLocation(200, 200) frame.setLayout(None) frame.setVisible(True) panel = JPanel() panel.setSize(500, 600) panel.setLocation(0, 0) panel.setLayout(None) panel.setVisible(True) panel.setBackground(Color.WHITE) heading = JLabel("Student Attendence") heading.setBounds(200, 10, 150, 30) table = JTable() table.setBounds(0, 50, 500, 450) panel.add(table) btnOk = JButton("Ok", actionPerformed=clickOk) btnOk.setBounds(200, 540, 100, 40) panel.add(heading) panel.add(table) panel.add(btnOk) frame.add(panel)
def adminLogined(instObj): global panel global table global heading global btnUpdate global frame frame = JFrame("Admin Page ") frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) frame.setSize(700, 640) frame.setLocation(200, 200) frame.setLayout(None) panel = JPanel() panel.setSize(700, 620) panel.setLocation(0, 20) panel.setLayout(None) panel.setVisible(True) panel.setBackground(Color.WHITE) heading = JLabel() heading.setBounds(310, 10, 200, 30) table = JTable() table.setBounds(0, 50, 700, 450) sp = JScrollPane(table, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS) btnUpdate = JButton("Update", actionPerformed=clickUpdate) btnUpdate.setBounds(300, 530, 100, 30) bar = JMenuBar() courses = JMenu("Course") addCourse = JMenuItem("Add Course", actionPerformed=clickAddCourse) showCourseList = JMenuItem("Show Course List", actionPerformed=clickShowCourseList) courses.add(addCourse) courses.add(showCourseList) bar.add(courses) teacher = JMenu("Teacher") addTeacher = JMenuItem("Add Teacher", actionPerformed=clickAddTeacher) showTeacherList = JMenuItem("Show Teacher List", actionPerformed=clickShowTeacherList) showTeacherIdPassword = JMenuItem( "Show Teacher Id Password", actionPerformed=clickShowTeacherIdPassword) teacher.add(addTeacher) teacher.add(showTeacherList) teacher.add(showTeacherIdPassword) bar.add(teacher) student = JMenu("Student") addStudent = JMenuItem("Add Student", actionPerformed=clickAddStudent) showAllStudentList = JMenuItem("Show All Student", actionPerformed=clickShowAllStudent) showStudentsByCourse = JMenuItem("Show Student By course", actionPerformed=clickShowStudentByCourse) showStudentsByTeacher = JMenuItem( "Show Student By Teacher", actionPerformed=clickShowStudentByTeacher) showStudentIdPassword = JMenuItem( "Show Student Id Password", actionPerformed=clickShowStudentIdPassword) student.add(addStudent) student.add(showAllStudentList) student.add(showStudentsByCourse) student.add(showStudentsByTeacher) student.add(showStudentIdPassword) bar.add(student) attendence = JMenu(" Teacher Attendence") teacherAttendence = JMenuItem(" Take Teacher Attendence", actionPerformed=clickTotalAttendence) specificTeacherAttendence = JMenuItem( "Show Specific Teacher Attendence", actionPerformed=clickShowSpecificTeacherAttendence) allTeacherAttendenceMonth = JMenuItem( "All Teacher Attendence In Month", actionPerformed=clickShowAllSTeacherAttendenceMonth) specificTeacherAttendenceInMonth = JMenuItem( "Specific Teacher Attendence In Month", actionPerformed=clickShowSpecificSTeacherAttendenceMonth) allTeacherAttendenceStatisticsInMonth = JMenuItem( "All Teacher Attendence Statistics In Month", actionPerformed=clickShowAllTeacherAttendenceStatisticsMonth) attendence.add(teacherAttendence) attendence.add(specificTeacherAttendence) attendence.add(allTeacherAttendenceMonth) attendence.add(specificTeacherAttendenceInMonth) attendence.add(allTeacherAttendenceStatisticsInMonth) bar.add(attendence) studentAttendence = JMenu(" Student Attendence") specificTeacherStudentsAttendence = JMenuItem( "Show Specific Teacher Students Attendence", actionPerformed=clickShowSpecificTeacherStudentsAttendence) specificCourseStudentsAttendence = JMenuItem( "Show Specific course Students Attendence", actionPerformed=clickShowSpecificCourseStudentsAttendence) specificTeacherStudentsAttendenceInMonth = JMenuItem( "Show Specific teacher Students Attendence In month", actionPerformed=clickShowSpecificTeacherStudentsAttendenceInMonth) specificCourseStudentsAttendenceInMonth = JMenuItem( "Show Specific course Students Attendence In month", actionPerformed=clickShowSpecificCourseStudentsAttendenceInMonth) allStudentsAttendenceStatisticsInMonth = JMenuItem( "All Students Attendence Statistics In month", actionPerformed=clickShowAllStudentsAttendenceStatisticsInMonth) specificTeacherStudentsAttendenceStatisticsInMonth = JMenuItem( "Specific Teacher Students Attendence Statistics In month", actionPerformed= clickShowSpecificTeacherStudentsAttendenceStatisticsInMonth) specificCourseStudentsAttendenceStatisticsInMonth = JMenuItem( "Specific Course Students Attendence Statistics In month", actionPerformed= clickShowSpecificCourseStudentsAttendenceStatisticsInMonth) specificStudentAttendenceInMonth = JMenuItem( "Specific Student Attendence In month", actionPerformed=clickShowSpecificStudentAttendenceInMonth) studentAttendence.add(specificTeacherStudentsAttendence) studentAttendence.add(specificCourseStudentsAttendence) studentAttendence.add(specificTeacherStudentsAttendenceInMonth) studentAttendence.add(specificCourseStudentsAttendenceInMonth) studentAttendence.add(allStudentsAttendenceStatisticsInMonth) studentAttendence.add(specificTeacherStudentsAttendenceStatisticsInMonth) studentAttendence.add(specificCourseStudentsAttendenceStatisticsInMonth) studentAttendence.add(specificStudentAttendenceInMonth) bar.add(studentAttendence) studentFee = JMenu("Student Fee ") payStudentFee = JMenuItem("Pay", actionPerformed=clickPayStudentFee) showStudentFeeListByCourse = JMenuItem( "Student Fee list By Course", actionPerformed=clickShowStudentFeeListByCourse) studentFee.add(payStudentFee) studentFee.add(showStudentFeeListByCourse) bar.add(studentFee) logout = JMenuItem("logout", actionPerformed=clickLogout) bar.add(logout) btnUpdate.setVisible(False) panel.add(table) panel.add(btnUpdate) frame.setJMenuBar(bar) frame.add(panel) frame.setVisible(True)