我有这段代码:
public void start(Stage primaryStage) throws Exception {
.......
.....
Media media = new Media(Paths.get("resources/x.mp3").toUri().toString());
MediaPlayer player = new MediaPlayer(media);
player.play();
}
当应用程序运行时,我会进入" help"在菜单栏中,音乐停止。 有没有办法让它继续玩?或者当我离开"帮助"窗口?