Login  Register

help

Posted by ashish ram on Jun 24, 2009; 12:19pm
URL: http://imagej.273.s1.nabble.com/help-tp3692012.html

Hello everyone,

I am a new user of imageJ and and presently using it first time for my
project.For that i am writin codes for a plugin.I am facing a very basic
programming difficulty and and i am unable to solve that.Here I am using an
Array of Object which i have declared like ...



class Result{
//Data fields...

}
public class Grid2 extends MouseAdapter implements PlugIn {
*Result result[][] = new Result[32][32];*


public void run(String arg) {

for(int p=0;p<32;p++){
for(int q=0;q<32;q++){
result[p][q] = new Result();
}
}
//*other codes here....which uses This array result[32][32]*
}//*run() ends here*

/*/some other codes that uses result*
}//PlugIn ends here


this works nice for me.But i want that the array size is given by user
during run time ,so need to be defined inside* run()*.But if i do that i
loose my access over that array as soon as run() ends and can not use it
outside it.I hope i am clear about my problem.*I want to access the array
outside the run() block but at the same time declare it inside run().*

Thank you all.
Ashish