
89Rich GUI Using Java Swing
jScrollbar = javax.swing.JScrollBar;
jScrollbar.setOrientation(jScrollbar.HORIZONTAL);
javacomponent(jScrollbar,[10,40,200,20]);
uicontrol('style','slider', 'position',[10,10,200,20]);
A Swing JScrollBar component (top) and a MATLAB slider uicontrol (bottom)
(See color insert.)
The topmost component (a JScrollBar object) not only looks visually more appealing than
the MATLAB uicontrol beneath it (which looks so Windows95 1990s style in my opinion), but
also has a more consistent look-and-feel with other MATLAB uicontrols, since they are all
based more closely on Swing.
†
JScrollBar can also be customized in app ...