For performance reasons I am using old version of uitable in Matlab. I am trying to change the cell-border-color of the table header. At present two column header cells are indistinguishable from each other. I have tried the following:
Custom column renderer but still can't change the table header border. The following seems to work but borders the entire header rather than table header cells.
h_old=uitable('v0','data',magic(5),'position',[5,5,550,400]);
set(h_old,'Units','normalized');
% get the underlying java table
jtable=h_old.getTable;
% get table header
theader=jtable.getTableHeader;
% set intended color
color=java.awt.Color(9471874);
% create a line border
theaderborder=javax.swing.BorderFactory.createLineBorder(color);
% set it in table header
theader.setBorder(theaderborder);
This sets border around entire header but not in cells. Any one know how to do that?
For changing jtable grid (table cells border), I can do jtable.setGridColor(color). I am looking for equivalent but for table header cells.
Thanks, Amit