Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic