Stop List of Threads

I have an array list of Threads and I want to stop all threads in the list if the cancel button pressed from GUI. Is there any way to stop all these threads? List threads = new ArrayList&…