You can disable the capture to JPEG button by default. and when the video
play is pressed or when the video starts playing then you can enable the button.
You can achieve the same by keeping a boolean variable and keeping its value
to true when the video is running or else false.
You can capture picture from the panel without using the coordinates. Just
write a method in the panel itself that returns the image object. In this way
you are not worried about the panel's coordinates