java - Access JTable cell component -


ok have jtable i'm displaying jlist on every cell. had implement tablecellrenderer , extend defaultcelleditor. here return actual jlist rendered in gui.

what want when user de-selects item jlist, want de-select items jlists table row starting @ clicked column.

my problem can't figure out way de-select items come after current clicked table column. can access defaultlistmodel. guess need access actual jlist in order remove selected items.

below method i'm using. ideas how this? thanks.

public void deselectfromlocation(int row_, int column_){         defaulttablemodel dtm = (defaulttablemodel) table1.getmodel();          int cols = dtm.getcolumncount();         for(int i=column_; i<cols;i++){             pcslistmodel lm = (pcslistmodel) dtm.getvalueat(row_, i);             //how can access actual jlist object in order  remove selected items?              //the pcslistmode defaultlistmodel , has no access jlist object. thanks.           }      } 

presumably, renderer , editor obtain existing selection state tablemodel, perhaps updating instance of listselectionmodel used part of preparing component use. can update other model value(s) in implementation of stopcellediting(). tablemodel have fire suitable tablemodelevent other cells; not value being edited. related example seen here.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -