Corey Knoettgen wrote:Unless, you are talking about the position of the DirectoryChooser dialog itself relative to the Stage itself? We wouldn't want it perfectly centered, or else it would cover up the stage (unless, that is what you want).
Are you trying to center the DirectorChooser with respect to the right and left of the Stage, and yet position the DirectoryChooser dialog underneath the title line/upper border of the Stage?
Or, was I more on track with first answer (which had more to do with the Button that opens the DirectoryChooser dialog)? (Or, neither)?
If this is the case, the answer may be far from straightforward. An entire project has emerged to enhance the features of JavaFX Dialogs: http://fxexperience.com/controlsfx/
Hi,
you are right in your 2nd post.
I want the dialog that shows up (not the button or any other gui element that fires it up) to be centered. And no, it won't cover the whole stage screen or etc. Its size is much smaller. But, as far as I can see this is a platform specific matter, since in linux/macos OSs this dialog is (by default) centered on screen, but not in the center of the stage. That means if we move our application near a screen's corner , then the dialog will still show up centered BUT in the center of the screen and NOT in the new (x,y) position of our application.
To better understand what I mean, this functionality is already implemented in a JFileChooser (Swing Component). So, what not in JavaFX?!
I want somehow to report this to the JavaFX developers team, in order to fix it.