④ DisposeDiag类
DisposeDiag类用来关闭提示框
class DisposeDiag extends Thread
{
public void run()
{
try
{
currentThreadjoin();//等待事务处理线程结束
}
catch(InterruptedException e)
{
Systemoutprintln(Exception: + e);
}
clueDiagdispose();//关闭提示框
}
}
注为了共用变量clueDiag上述ThreadDiag类和DisposeDiag类放在同一个Java文件内如果分开存放只需传递一下参数即可
上述程序在jdk下运行通过
[] [] [] []