// Simple example of how to fire an event when the value of 'foo' is changed. protected void setFoo(int foo) { if (this.foo != foo) { // Remember previous value, assign new value and then fire event. int oldFoo = this.foo; this.foo = foo; support.firePropertyChange("foo", ...
publicvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) Example In the following code shows how to use SystemTray.addPropertyChangeListener(String propertyName, PropertyChangeListener listener) method. importjava.awt.AWTException;importjava.aw...
Example 10Source File: SubtleScrollBarUI.java From pumpernickel with MIT License 5 votes @Override public void installUI(JComponent c) { super.installUI(c); c.setOpaque(false); c.addPropertyChangeListener("opaque", opaqueListener); trackColor = new Color(trackColor.getRed(), trackColor.get...