This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
TopComponent tc = new TopComponent(); tc.setName("name1"); tc.addPropertyChangeListener("name", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent pce) { System.err.println(pce.getPropertyName() + " / " + pce.getOldValue() + " / " + pce.getNewValue()); } }); tc.setName("name2"); It prints the event twice: name / name1 / name2 name / name1 / name2 Looking at the source of TopComponent: public void setName(final String name) { String old = getName(); if ((name != null) && (name.equals(old))) { return; } super.setName(name); firePropertyChange("name", old, name); // NOI18N // XXX When displayName is null, it is used the name. WindowManager.getDefault().topComponentDisplayNameChanged(this, name); } super.setName() calls JComponent and I thing that it already fires an event. So the subsequent firePropertyChange() is probably redundant.