• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic