Google

Wednesday, May 21, 2008

Inticas 005: Added Table

Added JTable:


I am now able to programmatically read each cell and also write to each cell.
For example, to set a value at cell 5, 5:


mytable.setValueAt("cc",5,5);


where mytable is a JTable object

To read a value from cell 5,5 :

String myvalue = (String)mytable.getValueAt(5, 5);


To be done:
Next I will implement code to save the contents of each cell in this xml format:






where PC, JM and SK are example Lecturer's names.

I will also need to implement code to enable user to populate the JTable with any selected xml file of the above format.

Tutorial on JTable