Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Matt
Posts:
513
Registered:
7/22/07
|
|
Table Header Borders
Posted:
Mar 6, 2013 5:22 PM
|
|
For backward compatibility and flexibility I still use the old version of uitable. In newer versions of Matlab the cell borders of the column header seem to have disappeared or become indistinguishable. Does anyone have advice on fixing this problem? I've fiddled with trying to add a custom cell renderer but still can't change the border (or background color for that matter).
Example in 2012b:
f = figure
mtable = uitable(f, 'Data',rand(3), 'ColumnNames',{'a' 'b' 'c'});%Column header has no cell borders.
jtable = mtable.getTable; vp = jtable.getParent.getParent.getColumnHeader;%View port. th = vp.getComponent(0);%Row header table.
th.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.BLACK))%Sets border around entire header but not in cells.
Thanks
Scott
|
|
|
|