Code example for PropertyChangeEvent

Methods: getNewValue, getOldValue, getPropertyName

0
 
    @Override 
    public void propertyChange(PropertyChangeEvent evt) {
        System.out.println(
                "data object user " + number + " has been notified by the change of the property '" +
                evt.getPropertyName() + "' that changed it's value from '" +
                evt.getOldValue() + "' to '" +
                evt.getNewValue() + "'");
    } 
     
}