I have two buttons on my Netbeans GUI form. One button is starting button, and the other is stopping button. When I press the start button, my code runs good, but when I try to stop then the stop button seems disabled. I cannot press the stop button.
My code starts from the GUI, in which this is my code for starting button
private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {
live p=new live(); //this calls the method of my application
p.livecapture();
}
code for stop button
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
mm=2;
}
The following while loop is present in my livecapture()
method
while(NewJFrame.mm!=2) {
}