
109Rich GUI Using Java Swing
HTML-rendered controls (popup menus and tooltips) (See color insert.)
HTML-rendered menus (See color insert.)
A blog reader has suggested
58
using HTML to display font names in their own font:
fontStr = @(font) ['<html><font face = "' font '">' font '</font></
html>'];
htmlStr = cellfun(fontStr,listfonts,'uniform',false);
uicontrol('style','popupmenu', 'string',htmlStr, 'pos',[20,350,60,20]);
HTML-rendered popup (combo-box) menu
There are some caveats when using HTML with uicontrols: HTML buttons do not underline
the mnemonic character (e.g., Cancel) — we need to underline it ourselves (<u>C</u>ancel).
Also, a Java bug ...