i would like to change the java slider property after i click a button, the problem is, normally we use the 'handles.X' to get in the thing which we want to handle. But with java component i got this reply.
Reference to non-existent field 'jSlider2'.
this is the callback code
function Pushbutton_Callback(hObject, eventdata, handles) set(handles.jSlider2,'Maximum',5);end
this is the slider definition, which i wrote in OpeningFcn
jSlider2 = javax.swing.JSlider(1,10,1); jSlider2 = javacomponent(jSlider2, [40,90,500,40]);set(jSlider2, 'MajorTickSpacing',1, 'PaintTicks',true,'PaintLabels',true);
Best Answer