Breaking for-loops with listeners?
I have an action listener on a button that starts a for-loop. I would like to add a key listener that causes that for-loop to stop, but instead it waits for the for-loop to finish before it executes the command. How can I get this for loop to stop before it is finished iterating?
start, stop are Components.
execute some for-loop
stop for-loop from the 'start' component