I was working on a packet capture program am trying to capture and stop a packet capture.I am using
java threads to create a
thread for capture and the java JButton to stop the capture but when i recapture packets i get a Thread exception saying i have already created the thread capture but i had already "killed" interrupted the thread when i pressed stop.I know thread stop,wait etc are obsolete but i don't know where how to stop a thread. here is the code
how do i stop threads or better how can i press stop to halt a capture thread then resume it when i press capture again.