Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Table Header Borders
Replies: 1   Last Post: Mar 19, 2016 4:07 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt

Posts: 513
Registered: 7/22/07
Table Header Borders
Posted: Mar 6, 2013 5:22 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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


Date Subject Author
3/6/13
Read Table Header Borders
Matt
3/19/16
Read Re: Table Header Borders
Amit

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.