0 Replies Latest reply: Oct 30, 2012 6:16 AM by 843260 RSS

    Window minimize problem.

      when I minimize javafx2 window it gets x=-32000 and y=-32000 coordinates, so when the window is minimized I cannot determinate on which monitor it was opened (application that I write will be using more than one monitor). After deminimize, window gets back to it's original position on the monitor so I hoped that coordinates before minimize are kept in Stage object but I cannot find anything like this. I would appreciate any help.
      I'm using Windows 7 Professional and JavaFx 2.2.3 from Java SE 7u9.

      This problem does not apper on Ubuntu, JavaFx 2.2.0 beta. After minimize x and y coordinates do not change.

      I'm applying code to reproduce described situation.
      import javafx.application.Application;
      import javafx.beans.value.ChangeListener;
      import javafx.beans.value.ObservableValue;
      import javafx.scene.Scene;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;
      public class Screens extends Application {
           public static void main(String[] args) {
           public void start(final Stage primaryStage) throws Exception {
                StackPane root = new StackPane();
                primaryStage.setScene(new Scene(root, 300, 250));
                          new ChangeListener<Boolean>() {
                               public void changed(ObservableValue<? extends Boolean> prop, Boolean oldValue, Boolean newValue) {
                                    System.out.println("x=" + primaryStage.getX() + ", y=" + primaryStage.getY() + ", width=" + primaryStage.getWidth() + ", height=" + primaryStage.getHeight());
                                    System.out.println("iconified=" + newValue);
      Edited by: 840257 on 2012-10-30 04:14

      Edited by: 840257 on 2012-10-30 04:16

      Edited by: 840257 on 2012-10-30 04:16