网上常用的方法:
if ~isdeployed
newIcon=javax.swing.ImageIcon('.piciap.jpg');
else
newIcon=javax.swing.ImageIcon('iap.jpg');
end
jFrame = get(hObject,'javaframe');
jFrame.setFigureIcon(newIcon);
运行后warning:
Warning: figure JavaFrame property will be obsoleted in a future release. For more information see the JavaFrame resource on the MathWorks Web site.
if ~isdeployed
newIcon=javax.swing.ImageIcon('.piciap.jpg');
else
newIcon=javax.swing.ImageIcon('iap.jpg');
end
jFrame = get(handle(hObject),'javaframe');
jFrame.setFigureIcon(newIcon);
转载本文请联系原作者获取授权,同时请注明本文来自刘磊科学网博客。
链接地址:http://blog.sciencenet.cn/blog-200199-886204.html
上一篇:书摘(2015-4-28)司马光论德才
下一篇:Latex: METAFONT mode mismatch