2

I have to write a Attendance Module for a school. I am using Java Swing to design the screens.

When user click on attendance tab of JTabbedPane, two buttons are there: 1) Add Attendance 2) Display Attendance

  1. Here to add attendance user have to select Class from JCombobox and Date from JDateChooser.

    Then JTable will display id and student Names available in that particular class. Following shows columnnames in jtable.

    StudentId | NAme | 1stDay | 2nd Day |....... |31stDay | No.Of Present days

    I can add daywise attendance successfully.I am using only one table StudentAttendanceTable in Oracle.

  2. Here User has to choose class and month,year to see attendance.Now I am getting list of attendance records in particular month bt how to display attendance of particuar day in that particular column of JTable?

I hope you are getting my point.

Just give me a way to sort attendance daywise and display it it JTable, so that when user must see attendance of all students from class and month he selects.

Coder
  • 116
  • 1
  • 15

1 Answers1

3

Just give me a way to sort attendance daywise and disply it it jtable, ..

Use a TableRowSorter. (short enough?)

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • sort in the sense,the way by which i can display attendance of particular date in that column.For Example,attendance of 1st September 2013 will go to 1st Day column in JTable,2nd Sep 2013 to 2nd Day column in Jtable...likewise.Is there a way? – Coder Sep 21 '13 at 06:25
  • So this is always going to be a table of a **single row**? – Andrew Thompson Sep 21 '13 at 06:42
  • JTable contains students list of particular class.i.e.contains multiple rows.Actually this approach requires some manipulation,So I changed my database table.Now database table has as many columns as columns in JTable.It made me easy to store and retrieve the student attendance. – Coder Sep 22 '13 at 11:02