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

Stage Jumps to Center

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 18.04.1 LTS, 64-bit

      A DESCRIPTION OF THE PROBLEM :
      Briefly, the Stage is displayed in the top left and then jumps to the center of the screen. This happens even if I set X and Y prior to showing the Stage.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached Application

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Stage is displayed in the center with no jumps.
      ACTUAL -
      The Stage is displayed in the top left then jumps in the center

      ---------- BEGIN SOURCE ----------
      public class HelloWorldApp extends Application {

          @Override
          public void start(Stage stage) throws Exception {

              Button b = new Button("Press");

              VBox vbox = new VBox( b );

              Scene scene = new Scene( vbox, 568, 320);

              stage.setScene( scene );
              stage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None. I tried setting the X and Y prior to showing the Stage. I also tried setting X and Y in the onShown handler.

            pmangal Priyanka Mangal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: