java - Get cell position -


i want draw line first clicked cell second clicked cell, need position of cell. jtable disabled, cells can't selected. think simplest way line drawline() don't know how can set line in middle of clicked cell middle of second clicked cell. have row , column of cell.

to draw line on top of table want use jlayer class. read section swing tutorial on how decorate component jlayer class basic examples , more information.

i have row , column of cell.

you can use getcellrect(...) method of jtable rectangle bounds of cell. draw line center of each rectangle.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -