| Author |
parent window notification
|
Duane Riech
Ranch Hand
Joined: Feb 27, 2003
Posts: 52
|
|
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
Joined: Oct 08, 2001
Posts: 2937
|
|
windowClosing() method of the WindowAdapter class. Eugene.
|
 |
Duane Riech
Ranch Hand
Joined: Feb 27, 2003
Posts: 52
|
|
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
Joined: Oct 08, 2001
Posts: 2937
|
|
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
Joined: Feb 27, 2003
Posts: 52
|
|
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.
|
 |
 |
|
|
subject: parent window notification
|
|
|