stage.show();
final DoubleProperty opacity = stage.opacityProperty();
Timeline fadeIn = new Timeline(
new KeyFrame(Duration.ZERO, new KeyValue(opacity, 0d)),
new KeyFrame(new Duration(fadeInOutTime * 1000),
new EventHandler() {
@Override
public void handle(Event t) {
Timeline display = new Timeline(
new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
new KeyFrame(new Duration((displayTime - fadeInOutTime * 2) * 1000),
new EventHandler() {
@Override
public void handle(Event t) {
Timeline fadeOut = new Timeline(
new KeyFrame(Duration.ZERO, new KeyValue(opacity, 1d)),
new KeyFrame(new Duration(fadeInOutTime * 1000),
new EventHandler() {
@Override
public void handle(Event t) {
stage.hide();
}