In chVal's run() method, make the loop test not only whether it's at the end of progress, but also whether it has to abort. Simply use a boolean member variable, and set this boolean to abort in your reset button.
By the way, your code looks very bulky. Don't fully qualify classes in your code. Instead, import java.awt.event.*, javax.swing.event.* and javax.swing.border.* and use simply class names in your code.
Also, never use variable names like j or l as member variables. They need to be descriptive. You should also use upper camel case for class names. Don't use chVal, it doesn't follow naming conventions, and its meaning is not clear.
Also, don't call your methods names like jButton2ActionPerformed(), call them names that describe what they do, like reset().
The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
I feel it's unfortunate that Oracle, and Sun before them, present the NetBeans visual designer as a beginners' tool, as witness the byline in the Swing Tutoral index page:
Learning Swing with the NetBeans IDE is the fastest and easiest way to begin working with Swing.
I wouldn't agree with that. The fastest and easiest way to learn Swing is to learn the API and how to use it, with the help of tutorials and the occasional input from a more experienced person, on a forum or elsewhere. The visual designer can be a powerful productivity booster in the hands of a skilled and experienced Java / Swing coder, who would know better than to blindly accept default variable and method names, and who would know just what all the auto-generated code does.
There are no new questions, but there may be new answers.
Sure it's acceptable. The thing is, it's also acceptable to post your own code here and ask questions about it. But posting somebody else's code which you don't understand... that irritates people a bit. And that's basically what you're doing when you post code generated by Netbeans. So they tend to say things like "Learn Swing for yourself first, then you won't be taken aback when you are forced to debug somebody else's Swing code".
Just my two cents (CAD, not US pesos) about where those complaints are coming from.
well darryl i just want to know it is good to use use netbeans IDE for studying swing as most memorizing thing that after applying . on the object (JButton.setEnable(true)) we are able to see how many more function are associated with the object so that every time we don't need to refer javadoc
@ paul after core i want to concentrate on swing should i continue with netbeans or the same cmd(>_) or terminal[ashish : $]
Just to be clear: I don't recommend coding Java in Notepad. By all means take advantage of the syntax highlighting and code completion, with popup javadoc, that an IDE provides.
My stand is that the NetBeans visual designer is not a beginners' tool, and never will be. It actually lowers productivity for a beginner, and is IMHO about 5 times more difficult to learn than it is to learn hand coding.
OTOH, once you have adequate exposure to Swing coding, once you know what can (and should) be done, it's relatively easier to discover for the first time how to do that in a visual designer.