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

Mac: dirChooser.showDialog() returns immediately "null" but somehow remains open and appears to work (...when being executed from a Button onAction Eventhandler in new Stage)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • javafx
    • OS X 10.8.1 (12B19)

      java version "1.7.0_07"
      Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
      Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

      We perform the following steps:

      - create a new Stage (an additional one besides the primary Stage),
      - add a Button to this new Stage and attach an OnAction EventHandler to the button,
      - close the Stage (the new one) in the EventHandler.handle() method and
      - finally create a new DirectoryChooser and call dirChooser.showDialog() - while being still in the EventHandler.handle() method.

      On Mac OS X the call to dirChooser.showDialog() returns immediately with "null" but the native DirChooser Dialog is still open! The user can select a Directory but the Application will never receive the actual selection.

      The exact same code works on openSuSE 12.1 and Windows XP. All Systems run Java7u7.

      A short, self contained, correct (Compilable) example is attached to this issue (DirChooser.java)

            anthony Anthony Petrov (Inactive)
            jhohmuthjfx Jens Hohmuth (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: