abstract class f_xt extends Mathd
{
  // single function  two independent variable : x,t
  // a single value is returned 
  abstract double func(double x,double t);
}

 class timeContourPlot extends Thread
 {int nx,ny,nt;
 double T[][][];
 double dt;
 double dt_real;
 double xmin,xmax,ymin,ymax;
 int nc;
 String title;
 String xlabel;
 String ylabel; 
 boolean inttype;
 public timeContourPlot(double Ti[][][],double x0,double xn,double y0,double yn,double dti,double dt_reali,int nci,String titlei,String xlabeli,String ylabeli,boolean inttypei)
 {nx=T[0][0].length;ny=T[0].length;nt=T.length;
 dt=dti;
 dt_real=dt_reali;
 title=titlei;
 xlabel=xlabeli;
 ylabel=ylabeli;
 inttype=inttypei;
 xmin=x0;
 xmax=xn;
 ymin=y0;
 ymax=yn;
 }
 
 public void run()
 {//double[][] zArr,double x0,double xn,double y0,double yn,int nc, boolean intType,String title, String xLabel, String yLabel)
 int i=0;
 title="t = "+i*dt_real+" s";
 ContourPlot pp=new ContourPlot(T[i],xmin,xmax,ymin,ymax,nc,inttype,title,xlabel,ylabel);  
 for(i=0;i<nt;i++)
 try {
 int t=(int)(1000*dt);
 pp.plot();
 Thread.sleep(t);
 //pp.setPlot(T[i+1],xmin,xmax,ymin,ymax,nc,inttype,title,xlabel,ylabel);
 //pp.run()
 //pp.dispose();
     }
 catch(InterruptedException e)
 {System.err.println(e.toString());}
 }
 }