How can I make the icon in the Jtable(java) using Matlab code
Show older comments
I try to make the java jtable in the matlab GUI.
First I downloaded the jcontrol at the File Exchange and then made JTable.
However I can not find the way to make icon inside each cell of JTable.
I thought there are two way, 1. using 'DefaultTableCellRenderer' 2. using Lebels
is anybody help this problem?
--------------------------------------
figurehandle=figure; scrollpane=jcontrol(figurehandle, 'javax.swing.JScrollPane', 'Position', [0 0 0.4 1]);
colname={'a','b','c'};
obj = {1 2 3; 4 5 6 ; 7 8 9};
htable = javax.swing.JTable(obj,colname);
scrollpane.setViewportView(htable);
hicon = javax.swing.ImageIcon('delete.png')
and then??
Answers (0)
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!