GUIDE - Java component creates grey box in a certain position on the screen

3 ビュー (過去 30 日間)
Tor Hadas
Tor Hadas 2016 年 4 月 9 日
コメント済み: Geoff Hayes 2016 年 4 月 10 日
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
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 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by