This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Java PropertyChangeListener as an Observer  RSS feed

 
Rancher
Posts: 507
15
Java Notepad
  • Mark post as helpful
  • send pies
  • 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: 5341
143
  • Mark post as helpful
  • send pies
  • 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.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!