aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes What if the FileDialog is invoked from a JDialog??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "What if the FileDialog is invoked from a JDialog???" Watch "What if the FileDialog is invoked from a JDialog???" New topic
Author

What if the FileDialog is invoked from a JDialog???

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
What if the FileDialog is invoked from a JDialog???

If I do this:
FileDialog fd = new FileDialog(new JFrame(),"Save As",FileDialog.SAVE);

this is ok BUT if the user switches to a diff aplication (say IE) the FileDialog is going backwords and the application is 'frozen'.

and i cant palce a JDialog in the constructor?

FileDialog fd = new FileDialog(???,"Save As",FileDialog.SAVE);


I tried to get the root frame with

Component c = SwingUtilities.getRoot((Component)e.getSource());
JFrame frame = (JFrame)c;


but it doesn't work because the 'rootFrame' is a dialog.

HELP

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What if the FileDialog is invoked from a JDialog???