How to make a java Jpanel as child of uiPanel or uifigure ?
2 views (last 30 days)
Show older comments
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 Comment
Lama Itani
on 29 Jul 2021
Edited: Lama Itani
on 29 Jul 2021
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]);
Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!