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
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 CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by