How do I check when JFrame window is closed?
JFrame
MediaPanel mediaPanel=new MediaPanel(); JFrame_of_subtitle frame=new JFrame_of_subtitle(mediaPanel); JP
You will add WindowListener to your frame.
WindowListener has a windowClosing callback function which will be invoked when your frame is being closed.
You can see this tutorial for sample code.