How to make a java Jpanel as child of uiPanel or uifigure ?
2 次查看(过去 30 天)
显示 更早的评论
Hi all,
I have a java-Jpanel class using openGL and i would like to "insert" this java class in a matlab container like uiPanel or uifigure.
At the moment it works using javacomponent undocumented function :
Is there some possibilities to do something like that :
f = uifigure;
p=uipanel(f,'Position',[.25 .1 .67 .67],'Title','Main Panel');
p.Children=myJPanelObject; OR p.addChildren(myJPanelObject)
Alternatively, is it possible to add a uiPanel as a child of a JPanel ?
Thanks for your help
1 个评论
Lama Itani
2021-7-29
编辑:Lama Itani
2021-7-29
Hi Philippe,
not sure if I understood 100% what you are trying to achieve but I think there might be another workaround to this by creating a subpanel, let's say stored in variable subp, which considers variable p as a parent. In this way, sp will be the child of p.
f = figure;
p = uipanel(f,'Position',[.25 .1 .67 .67],'Title','Main Panel');
subp = uipanel('Parent',p,'Title','Subpanel','FontSize',10,...
'Position',[.4 .1 .5 .5]);
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!