|
hi guys,
basically I've this code (I want the UI to have some java components):
if ~usejava('jvm')
error([mfilename ' requires Java to run.']);
end
if usejava('swing')
figH=figure('Name','UITEST',...
'Menubar','none',...
'NumberTitle','off',...
'Resize','off',...
'Position',[360 278 320 320],...
'Tag','sfig',...
'ToolBar','none');
panel=awtcreate('javax.swing.JPanel');
[r,p]=javacomponent(panel,[6,6,310,305],figH);
Lb=javax.swing.JLabel('Selected ".sef" File(s):') ;
javacomponent(Lb,[8 280 120 25],p);
Bt=javax.swing.JButton('Clear File(s)');
javacomponent(Bt,[8,200 50 30],p);
end
The code works but the problem is the label and the button do not come up in the position specified but instead at the bottom of the panel. Note I do note want the label and the button on "figH" but on "panel". how can I code it so that they come up at the shown position in the above code?......any help would be massively appreciated.
|