GUIDE - Java component creates grey box in a certain position on the screen
5 views (last 30 days)
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)