@Override
public Object getValueAt(int row, int col) {
// TODO Auto-generated method stub
switch(col){
case COURSE_NAME:return list.get(row);
case COURSE_BUTTON:final JButton jbtn = new JButton("Go to Course Page");
jbtn.setActionCommand(list.get(row));
jbtn.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
String course=jbtn.getActionCommand();
System.out.println(course+" on button press");
//System.out.println(" on button press");
String path=cmdao.getDirectoryPathForProf(course, user);
pf.csp.curr_subject=course;
System.out.println(path);
try {
pf.csp.resetPanes(pdao.getProfByUsername(user), path);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
CardLayout card=(CardLayout)pf.panel.getLayout();
pf.btnBack.setEnabled(true);
card.show(pf.panel, "CourseSpecificPanel");
}
});
return jbtn;
}
return null;
}
tableModelTeach.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:Course-Management-System
作者:
评论列表
文章目录