Code example for PropertyChangeEvent

Methods: equals, getNewValue, getOldValue, getPropertyName

0
	} 
	 static class QueryBeanListener implements PropertyChangeListener 
	 { 
		    // This method is called every time the property value is changed 
		    public void propertyChange(PropertyChangeEvent evt) {
		    	if(evt.getOldValue()==null||evt.getNewValue()==null||evt.getNewValue().toString().equals("")||evt.getOldValue().toString().equals("")||evt.equals(null))
		    		grid.clearTextFilter();
		    	else 
		    	{ 
		    		String filterText=evt.getNewValue().toString();
		    		System.out.println(filterText);
		    		grid.setFilterText(filterText);
		    	} 
		    	System.out.println("Name= " + evt.getPropertyName());
 
		    	System.out.println("Old Value = " + evt.getOldValue());
 
		    	System.out.println("New Value = " + evt.getNewValue());
 
		    	System.out.println("**********************************");		
 
		    } 
		}