DefaultTableModel dataModel = (DefaultTableModel)tableComp.getTableModel();
dataModel.addColumn("Column 1");
dataModel.addColumn("Column 2");
dataModel.addColumn("Column 3");
dataModel.addColumn("Column 4");
dataModel.addRow(new Circle[] {new Circle(20),new Circle(25),new Circle(30),new Circle(35)});
dataModel.addRow(new Circle[] {new Circle(20),new Circle(25),new Circle(30),new Circle(35)});
dataModel.addRow(new Circle[] {new Circle(20),new Circle(25),new Circle(30),new Circle(35)});
ListSelectionModel rowSelModel = tableComp.getRowSelectionModel();
//ListSelectionModel columnSelModel = tableComp.getColumnSelectionModel();
rowSelModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
// columnSelModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
tableComp.setRowSelectionAllowed(true);
tableComp.setColumnSelectionAllowed(false);
rowSelModel.addListSelectionListener(new SVGCircleTableRowSelectionDecoration(tableComp));
rowSelModel.setSelectionInterval(1,1);
dataModel.addTableModelListener(this);
rowSelModel.addListSelectionListener(this);
this.removeButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("removeId");
removeButton.addEventListener("click",this);
this.itemComp = new ItsNatHTMLInputText[dataModel.getColumnCount()];
for(int i = 0; i < itemComp.length; i++)
{
this.itemComp[i] = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("itemId" + i);
Circle circle = (Circle)dataModel.getValueAt(rowSelModel.getMinSelectionIndex(), i);
itemComp[i].setText(circle.toString());
}
this.posComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("posId");
posComp.setText(Integer.toString(rowSelModel.getMinSelectionIndex()));