File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting a null frame (Event dispatching problem?)

 
Shaun Fernandes
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a JFrame, which launches a JDialog from its constructor.
The JDialog posts back an event to this parent frame when some button on the dialog (say Cancel) is pressed, thereby disposing the JDialog and the event is captured in the JFrame's overridden processEvent() method, where I call the rest of the initialization routine for the JFrame..like laying out the components in the frame and finally showing it. The problem is, when the JDialog is CLOSED (by clicking the "X" on the top right corner), I get a NULL parent frame located at (0,0). What could be going wrong?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Without seeing any code it is hard to say. Make sure that you have a WindowListener for your JDialog to catch the X button being used to close the JDialog.
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic