Code example for PropertyChangeEvent

Methods: getSource

0
	 * (non-Javadoc) 
	 * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) 
	 */ 
	@Override 
	public void propertyChange(PropertyChangeEvent event) {
		Robot robot = (Robot) event.getSource();
		if (robot.getCurrentWeight() > robot.getWeightCapacity()) {
			System.err.println("ROBOT OVERLOADED. OVERLOADED FLASHING.....");
		} 
	} 
 
}