I want my program to terminate itself once the movie played has ended, using system.exit(0).
is there a way of doing that?
I dont want to use Timer.
I want my program to terminate itself once the movie played has ended, using system.exit(0).
is there a way of doing that?
I dont want to use Timer.
The OP posted this answer as a comment.
player.addControllerListener(new ControllerListener() {
public void controllerUpdate(ControllerEvent e) {
if (e instanceof EndOfMediaEvent) {
System.exit(0);
}
}
}
Got it!
player.addControllerListener(new ControllerListener()
{
public void controllerUpdate(ControllerEvent e)
{
if (e instanceof EndOfMediaEvent)
{
System.exit(0);
}
}
}