Win a copy of Terraform in Action this week in the Cloud forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

parent window notification

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
windowClosing() method of the WindowAdapter class.
Eugene.
 
Duane Riech
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic