I want my program to end as soon as the movie ending has finished using system.exit (0).
Is there any way to do this?
I do not want to use a timer.
Got!
player.addControllerListener(new ControllerListener() { public void controllerUpdate(ControllerEvent e) { if (e instanceof EndOfMediaEvent) { System.exit(0); } } }
The OP posted this answer as a comment.
Source: https://habr.com/ru/post/1785746/More articles:Будет ли лучше использовать isInterrupted вместо прерывания в следующем случае - javaDataContext access from linq to SQL - c #ScrollView does not display some user interface elements - androidSoundManager2 onid3 () does not work - javascriptMVC Validation Attribute - validationEF CTP5 failed to update optional navigation property - entity-frameworkComparison of AVFoundation buffer with saved image - iosInvalid Content-Length sent to server? - javachanging the background color in ListView disables the highlight color - androidPython 3.1 - Memory error while fetching a large list - pythonAll Articles