Code example for PropertyChangeSupport

0
    private final AtomicInteger next = new AtomicInteger(1);
 
    public Settings() { 
        applicationPreferences = Preferences.userNodeForPackage(Settings.class);
        log = Logger.getLogger(Settings.class); 
        propSupport = new PropertyChangeSupport(this);
    } 
 
    public void addListener(String name, PropertyChangeListener listener) {
        propSupport.addPropertyChangeListener(name, listener);
    } 
 
    public void removeListener(String name, PropertyChangeListener listener) {
        propSupport.removePropertyChangeListener(name, listener);
    } 
 
    public void destroyPreferences() { 
        try { 
            getPreferences().removeNode();
        } catch (BackingStoreException e) {
Stop searching for code, let great code find you!  Add Codota to your java IDE