• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parent window notification

 
Duane Riech
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a child window which modifies a record
displayed by the parent window ( in a JTable). I
would like to post an event to notify the parent
when the child window is closed so the parent could update the JTable data.
Is there an event that the child can post to notify the parent when the child window closes??

Thanks in advance
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
windowClosing() method of the WindowAdapter class.
Eugene.
 
Duane Riech
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't the WindowClosing event post to the window
created? i.e. The CHILD window would receive the
window closing event when the CHILD was closed.
I've read several tech manuals about this event
and got that impression.

Thanks
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Doesn't the WindowClosing event post to the window
created? i.e. The CHILD window would receive the
window closing event when the CHILD was closed.

I am not sure what you are asking. If your purpose to notify the parent window when the child window is closed, then do just that, -- add window listener to your child window, override the windowClosing() method in that listener, and notify your parent window from that method.
Eugene.
 
Duane Riech
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's what I want to do. But what is the
mechanism in the windowclose() method that notifies the parent. There must be some event, posted by the child that can be caught by the parent. Is the parent notified, by some event, that the child window has closed?
Sorry about not being specific enough.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic