How to make a java Jpanel as child of uiPanel or uifigure ?

2 visualizaciones (últimos 30 días)
philippe duvauchelle
philippe duvauchelle el 3 de Jul. de 2021
Editada: Lama Itani el 29 de Jul. de 2021
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 comentario
Lama Itani
Lama Itani el 29 de Jul. de 2021
Editada: Lama Itani el 29 de Jul. de 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]);

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by