Java - How to bring FileDialog window to front?

The following Java FileDialog does work; except the window is behind all the other windows on the desktop.

FileDialog fd = new FileDialog(new Frame(), “Please choose file:”, FileDialog.LOAD);

fd.show();

How can I get it to show in front of the other windows?

Thanks, Neil.

Subject: Java - How to bring FileDialog window to front?

Hi Neil -

Have a look at the toFront() method inherited from java.awt.Window.

FileDialog fd = new FileDialog(new Frame(), “Please choose file:”, FileDialog.LOAD);

fd.show();

fd.toFront();

hth,

dgg