2 Replies Latest reply on Mar 13, 2013 8:47 AM by csh

    Problem with taskbar blinking of Stage (Win7)

      I try to let a stage blink in the taskbar.

      Obviously this can be achieved using the toFront() method, also mentioned here:

      But, I have the problem, that after the first showing of the stage, the stage will not blink again, if you hide it.

      Here is a sample test case. Run it and make sure, that you focus any other window. After 5 seconds a Stage popups up and it blinks. It will blink every 5 seconds, if you don't have the primary stage focussed.

      If you close the stage, it will popup up again. But this time it does NOT blink.

      Any solutions are appreciated!
      import javafx.animation.KeyFrame;
      import javafx.animation.Timeline;
      import javafx.animation.TimelineBuilder;
      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.stage.Stage;
      import javafx.util.Duration;
      public class TestApp4 extends Application {
          public static void main(String[] args) {
          private Stage subStage;
          public void start(final Stage stage) throws Exception {
              TimelineBuilder.create().keyFrames(new KeyFrame(Duration.seconds(5), new EventHandler<ActionEvent>() {
                  public void handle(ActionEvent t) {
                      if (subStage == null) {
                          subStage = new Stage();
              Scene scene = new Scene(new Label("Wait"), 300, 300);
        • 1. Re: Problem with taskbar blinking of Stage (Win7)
          I've found out, that the problem of not blinking lies in the fact, that the window automatically receives focus, which is also not good for my use case.

          I want the window to show, but not getting focussed automatically, in order to not disturb the user at his current work. E.g. if you type in this text box (on this forum), you would suddenly continue typing in the new window (if it has a TextArea), which is annoying.

          If the window is shown for the first time, everything is fine. Every following times, it receives focus automatically.

          I tried to initOwner() with the parent window. I don't have the problem then, but another one: The window does not show as separate window in the task bar.

          Can you help here?
          • 2. Re: Problem with taskbar blinking of Stage (Win7)
            The issue is still present and annoying. Can somebody comment or help?