Somehow the code seems to not always work when I run .m file. I built a GUI with a pushbutton and a edit box. If i press the pushbutton i can chose data such as .txt and .csv files and write the first 20 lines in the edit box. However, sometimes, when loding the same files (what I get when I load them is also identical, so it should not be my data loading function), there is a horizonal scrollbar and sometimes there is not. The follwoing I wrote in the GUI opening function:
jScrollPane = findjobj(handles.edit1);
jViewPort = jScrollPane.getViewport;
jEditbox = jViewPort.getComponent(0);
Do you have any idea? Is there a bug or is it just me (more likely XD)
I use findjobj to add icon on multiples Button and use Progressbar...but when i run the Gui, it open and close ( flasjing)at each "findobject" call.
then works fine... any idea what's going on ?
jButton = java(findjobj(handles.Apply, 'nomenu'));
myIcon = fullfile(currentDir,'/icons/apply.png');