フィルターのクリア

GUI How to put a javacomponent in an uipanel?

4 ビュー (過去 30 日間)
Tong Wang
Tong Wang 2018 年 4 月 16 日
コメント済み: Jan 2019 年 3 月 6 日
In GUIDE I tried to put the RangeSlider in my panle, like this
this is the code
jRangeSlider = com.jidesoft.swing.RangeSlider(1,10,2,7); % min,max,low,high
jRangeSlider = javacomponent(jRangeSlider, [0,0,200,80]); % define coordinate and size
set(jRangeSlider, 'MajorTickSpacing',1, 'PaintTicks',true, 'PaintLabels',true,'Parent',handles.uipanel); % set Labels and parent
And i got the response
The name 'Parent' is not an accessible property for an instance of class'com.jidesoft.swing.RangeSlider'.
Any suggestions?

採用された回答

Jan
Jan 2018 年 4 月 16 日
編集済み: Jan 2018 年 4 月 16 日

Try to set the Parent in the javacomponent call:

jRangeSlider = com.jidesoft.swing.RangeSlider(1,10,2,7);  % min,max,low,high
jRangeSlider = javacomponent(jRangeSlider, [0,0,200,80], handles.uipanel);
set(jRangeSlider, 'MajorTickSpacing',1, 'PaintTicks', true, 'PaintLabels', true);
  5 件のコメント
Yuriy Kuksarov
Yuriy Kuksarov 2019 年 3 月 5 日
Sorry, but why your code does not work for me, gives an error
"Error when using the hg java
The functionality is not supported by shapes created using the UI figure function. For more information, see graphics support in application designer."
Jan
Jan 2019 年 3 月 6 日
@Yuriy Kuksarov: The question concerns figures created by GUIDE. If you do something else, please open a new thread and explain in details what you are doing.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by