Created
January 26, 2009 09:25
-
-
Save lebesnec/52765 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
someComponent.addPropertyChangeListener(new PropertyChangeListener() { | |
public void propertyChange(PropertyChangeEvent evt) { | |
if (evt.getPropertyName().equals("color") && evt.getNewValue() instanceof Color) { | |
Color color = (Color) evt.getNewValue(); | |
someComponent.setColor(color); | |
someComponent.repaint(); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment