is event handling possible with any object?

can i set a event notification to any object? say for example if i have a multidimensional array of strings can i associate a event handler with it so that when a different application or part of a code changes it's contents i can fire a method?

consider the scenario

initially...

String userId[][]=new String[R][C];

public MyServer()

{

userId[0][0] ="mr00047";

userId[0][1] ="false";

userId[1][0] ="dider7";

userId[1][1] ="false";

userId[2][0] ="thegreendove";

userId[2][1] ="false";

....................................

..................................

}

now at some point the content of the userId array changes

for(int i=0;i<3;i++)

{

if(temp.equals(MyServer.userId[i][0]))

{

flag=true;

MyServer.userId[i][1]="true";// I want to fire a method from this point

break;

}

}

can any body tell me how can i do it? please help!!!

[1590 byte] By [mr47a] at [2007-10-3 4:07:32]
# 1
This could help you: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Observable.html
Franck_Lefevrea at 2007-7-14 22:07:10 > top of Java-index,Security,Event Handling...