
301Built-In MATLAB
®
Widgets and Java Classes
space must be reserved for other conguration controls. We can do this using the com.math-
works.widgets.fonts.FontPicker class, which is an extension of the standard
MATLAB MJPanel. FontPicker’s constructor accepts optional parameters of a pre-se-
lected font (a java.awt.Font object), boolean ag indicating whether to display sample text
using the selected font, layout indicator, and list of selectable font names. Several screenshots
of different parameter combinations are shown below:
jFontPicker = com.mathworks.widgets.fonts.FontPicker(font, sampleFlag, layout);
[hjFontPicker, hContainer] ...