JTable question

Hi everyon in the forum,

i have a question, i am working with a table and one of its columns has to be actualized depending on the other column values; i do not know how to implemet it, i mean, implementing a cell listener or stg realted with or a row listener,... .

The model and the table are implemented as follows :

DefaultTableModel tablemodel =new DefaultTableModel();

JTable table =new JTable( tablemodel );

for (int i=0; i< choices.size();i++){

tablemodel.addColumn(choices.get(i).getName());

}

tablemodel.addColumn("BEST CHOICE");

If anyone has face this problemm any kind of help will be mor than welcome.

thanks

[904 byte] By [patucosa] at [2007-11-26 17:20:01]
# 1
Either implement your own TableModel (you can extend DefaultTableModel) to provide your own; or, better, provide a separate object which is a TableModelListener and populates the relevant column of the original DefaultTableModel.
itchyscratchya at 2007-7-8 23:48:01 > top of Java-index,Desktop,Core GUI APIs...