Community
Participate
Working Groups
Build Identifier: The DirectoryDialog produces a Window whose placement on the screen seems to be quasi-random. There seems to be no way to get a reference to the underlying Window so that it can be centered on the screen. This leads to a poor user experience. Reproducible: Always
The position is determined by the OS. Adding setLocation only for one dialog (DirectoryDialog) doesn't make sense, we need to add to all others. We would need to know if setLocation() is possible for all dialogs on all platforms. Moreover, setLocation() alone is useless. If you want to center the dialog, you would also need getSize(). So, for the API to be consistent we would need to add to all dialogs: setLocation() getLocation() setSize() getSize() setBounds() getBounds() Which I know is not possible on all platforms. On windows, for example, you can only get the size of the dialog after you open it (or not at all, ain't sure). I'm closing this request as won't fix. Sorry. Let the OS determine the location of the dialog for you, that is what all application using DirectoryDialog (on windows) are doing.