Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

propertyChangeListener question  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have child dialog for choosing dates which is called from parent UI:
This dialog implements PropertyChangeListener and there is a corresponding propertyChange method which sets new values for the dates.

Here is the code I have in parent UI to call this dialog:
Date startDate;
Date endDate;
ChooseDatesDialog datesChoice = new ChooseDatesDialog();
ClientUtils.centerWindowOnTheScreen(datesChoice,220,160);
datesChoice.setTitle("Choosing dates");
datesChoice.setVisible(true);
How do I capture the event when date values are set within child dialog in this parent UI?
Thanks,
Sabina
 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use

Thank you
Garandi
 
Sabina Norderhaug
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Garandi Garandi:
use


My parent UI extends JPanel. I cannot apply addPropertyChangeListener(this); to it.
I can probably set parent UI to implement PropertyChangeListener and add propertyChange method to it.
Then again I already have PropertyChangeListener added to Date buttons within my child dialog.
Looks like I need to change the whole design
 
Did you just should on me? You should read this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!