Static Answer Guide
What aspect of it do you need help with? I assume you have some kind of for loop as progress bars are more tricky to update if your code is running an a while loop of unknown length or some other construct that doesn't allow predictable checkpointing. Within that for loop you can simply tell your static text box to update in some way.
How you do that depends what you want to show and how many iterations you are running in your loop - e.g. If it is just 10 slow iterations an update every time round the loop is fine. If you are running millions of iterations then you would only want to update the text box every e.g. 1000 or 10000 iterations.
Static Answer Guidelines
I just go with a java progress bar when I want to put a progress bar in a GUI.%Create a Progress bar with a range from 0 to 100 jBarHandle = javax.swing.JProgressBar(0, 100); jBarHandle.setStringPainted(true); jBarHandle.setIndeterminate(false);%You need a pixel position for where to put the bar, I tend to do this by finding a reference object in the GUI that I'm going to replace. PosPanel = getpixelposition(someReferenceObject,true);%Place the progress bar in the GUI javacomponent(jBarHandle,posPanel,guiFigureHandle);%Set the value of the progress bar. JBarHandle.setValue(fix(0)); For full information on the properties available with JProgressBar here's the link. If you really wanted to use waitbar, you could probably either modify the builtin function, or use the built-in function and clone the axes into your own GUI. Either way though, that seems a fair bit more complicated then just going with java swing.
There is a static noise in my headphones but its not my headphones its my computer can anyone help me? Inside your PC, there are many parts that generate electrical interference, so the sounds can.