GUIDE - Java component creates grey box in a certain position on the screen
2 次查看(过去 30 天)
显示 更早的评论
I have a very complicated gui, and I wanted to integrate some java components (to use the html feature and many more). The first time i used a java control i created a text input control:
javaHandle = javaObjectEDT('javax.swing.JTextField');
[handles.objTextbox, handles.hTextBox] = javacomponent(javaHandle);
set(handles.hTextBox, 'Parent', handles.panel1);
It worked great, nothing was wrong with it. After a while i wanted to add a static text control with html in it, so i created a java component:
javaHandle2 = javacomponent('javax.swing.JLabel');
[h1.obj, h1.h] = javacomponent(javaHandle2);
set(h1.h, 'Parent', handles.StatusBarTextPanel);
set(h1.h,'Position', [4 7 427 18]);
this line alone created a grey box in a certain position on the gui that cannot be moved. The component is normal, I can change it's text and position, but there still is that grey box in the gui. The first line (javaHandle2 = javacomponent) is the one causing the problem.
How can i solve this, and get rid of that grey box?
(the grey box, on the figure with a different color)
1 个评论
Geoff Hayes
2016-4-10
Tor - without knowing more about your GUI and where the above code is being called or how the panels are arranged it will be difficult to provide a solution. Also, where is the grey box appearing - within one of the panels or somewhere else?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Grey Hardware 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!