# Open JFileChoose on the secondary desktop?

**URL:** <https://forum.inductiveautomation.com/t/open-jfilechoose-on-the-secondary-desktop/28508>\
**Category:** Ignition\
**Tags:** ignition79, ignition80\
**Created:** [September 24, 2019, 3:00pm UTC](https://forum.inductiveautomation.com/t/open-jfilechoose-on-the-secondary-desktop/28508 "2019-09-24T15:00:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 24, 2019, 3:00pm UTC](https://forum.inductiveautomation.com/t/open-jfilechoose-on-the-secondary-desktop/28508/1 "2019-09-24T15:00:16Z")

</div>

I use a JFileChooser.showOpenDialog to open a dialog box to select a **directory**.

```auto
from javax.swing import JFileChooser

chooser = JFileChooser(defaultPath)
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY)	
chooser.setAcceptAllFileFilterUsed(False)
chooser.setDialogTitle(message)
window = system.gui.getParentWindow(event)
if chooser.showOpenDialog(window) == JFileChooser.APPROVE_OPTION:
	return chooser.getSelectedFile().getPath()
else:
	return None	

```

system.file.openFile can be only used for files.

When I use 2 desktop, the dialog is always opened in the primary desktop.  
Is the any way to open it on the secondary desktop ?
