swing - Select single cell JTable with mouse (eclipse) -
i know how can select single cell jtable mouse , after keep value of cell in variable. thank
you can use mouselistener
. read section swing tutorial on how write mouselistener more information , examples.
when click on cell need mouse point mouseevent
, convert cell in table. can data table. basic code be:
int row = table.rowatpoint(...); int column = table.columnatpoint(...); object cellvalue = table.getvalueat(row, column);
Comments
Post a Comment