Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094783

[Popup] PopupWindow.show(Window): Wrong popup positioning on subsequent calls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Environment:

      Windows 7 Pro SP1 x64, JDK8 build 129

      Description

      Code to reproduce the issue:

      package cz.zcu.fav.kiv.sparkle.gui.tools;

      import javafx.application.Application;
      import javafx.event.ActionEvent;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.stage.Popup;
      import javafx.stage.Stage;

      public class Test6 extends Application
      {
      public static void main(final String[] args)
      {
      launch(args);
      }

      @Override
      public void start(final Stage primaryStage) throws Exception
      {
      final Popup popup = new Popup();

      final Button button = new Button("Click me");
      button.setOnAction(new EventHandler<ActionEvent>()
      {
      @Override
      public void handle(final ActionEvent event)
      {
      popup.show(primaryStage);
      }
      });

      final Button closeButton = new Button("Close");
      closeButton.setOnAction(new EventHandler<ActionEvent>()
      {
      @Override
      public void handle(final ActionEvent event)
      {
      popup.hide();
      }
      });

      popup.getContent().add(closeButton);

      primaryStage.setScene(new Scene(button));
      primaryStage.show();
      }
      }

      1. Click the "Click me" button. Another button appears.
      2. Click the "Close" button. It disappears.
      3. Repeat the previous two steps to see the issue.

      The popup window gets positioned as if it was an ordinary window (that means left screen corner with variable offset on each attempt).

        Attachments

          Activity

            People

            Assignee:
            msladecek Martin Sládeček
            Reporter:
            jsmucrjfx Jan Smucr (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: