I made a JFrame and add button with ActionListener (I know how to perform an action on ActionEvent )
i used a thread to perform a task by following code snippet
But if user closes JFrame accidentally before executing myMethod() task will never performed.
I need to perform complete execution of myMethod() even user closes JFrame accidentally.
How do i do that? I'm an absolute beginner for Threads,Runnable ...
Are you better than me? Then please show me my mistakes..