
291Built-In MATLAB
®
Widgets and Java Classes
If we look closely at the screenshot above, then we will notice that the button and drop-
down subcomponents are stretched in the horizontal direction but not in the vertical direc-
tion. This is the basic behavior, which can be modied separately for any of the subcomponents
by specifying a third (optional) numeric argument, which is one of FormPanel.STRETCH_
NONE (=0), FormPanel.STRETCH_HORIZONTAL (=1, the default value), For m Panel.
STRETCH_VERTICAL (=2), and FormPanel.STRETCH_BOTH (=3):
jPanel = com.mathworks.widgets.FormPanel;
jPanel.addRow('Row #1:', javax.swing.JCheckBox('test1'))
jPanel.addRow('A ...