Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Java PropertyChangeListener as an Observer

 
Rancher
Posts: 508
15
Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a post about the usage of PropertyChangeListener as an Observer using a Swing example. This can be used in place of the java.util.Observer and Observable (deprecated in Java 9).

Read my post here: Java PropertyChangeListener as an Observer

Prasad.
 
Saloon Keeper
Posts: 6802
162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Observer/Observable have been obsolete for a long time - it was about time they got officially deprecated. A similar purpose is served by event buses like https://github.com/greenrobot/EventBus, which is the approach I prefer these days. It provides more flexibility and features for little overhead, and is annotation-based rather than requiring listeners to be registered. Thus source and sink are completely independent of one another.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic