@FXML void seek(MouseEvent evt) { if (player != null) { Duration d = player.getMedia().getDuration(); double millis = (evt.getX() / loadProgressBar.getWidth()) * d.toMillis(); Duration s = new Duration(millis); player.seek(s); } }
@FXML public void tracksViewMouseClicked(MouseEvent evt) { if (evt.getClickCount() == 2) { playSelectedTrack(); } }