Title the first column of a JTable with labelled rows - Java -
i have exact same code post: https://stackoverflow.com/a/8187799/5464538
this code create table one:
+------+------+------+------+ |/\/\/\| col1 | col2 | col3 | +------+------+------+------+ | row1 | | | | +------+------+------+------+ | row2 | | | | +------+------+------+------+ | row3 | | | | +------+------+------+------+ i want able label first cell of tab. 1 contains /\/\/\, in order give title first column. didn't find on researches on such thing. i'm not sure if possible current jtable. if not, there other way have result?
you can add component scrollpane using like:
scrollpane.setcorner(jscrollpane.upper_left_corner, new jlabel("row:")); however not since label not other row/column header renderers.
instead suggest check out row number table different implementation of row header more flexible using.
in code provided rownumbertable class find:
column.setheadervalue(" "); you need change statement text want see. maybe customize class pass in parameter containing string display in header.
Comments
Post a Comment