Hi I am still having problems with this bit of code....

the wait method is hanging the system..if if say
syncObj.wait(2000)
then it works..but there doesnrt seem to be any communication between
noify() and wait() methods. I am not able to work out about the problem...pls
do help...

Regards

Satish

private boolean upgradeComplete= false;
private Object syncObj = new Object();

if (response == JOptionPane.YES_OPTION)
{
depotVersion = JOptionPane.showInputDialog(parent,
"Please enter the depotVersion:" /*13A*/);
txtDisplay.append("Performing the OAM Upgrade " +
'\n');
// get ats connection, prepare data and send it

txtOAMVersion.setText(" ");

// pls check the code from here...................................

callInvokeOAMUpgrade();

// this mathod takes a few secs to execute and I want the callCurrentVersion
to wait for this to complete...


synchronized(syncObj)
{

while(upgradeComplete = false);
{
System.out.println(upgradeComplete);
try
{
syncObj.wait(); // I waant this to wait..
}
catch (Exception e){ }
}
if(upgradeComplete = true)
{
System.out.println(upgradeComplete);
syncObj.notify(); //after completion it notifys
callCurrentVersion();
}
}
}
else if (response == JOptionPane.NO_OPTION)
{
txtDisplay.append(" OAM Upgrade cancelled" + '\n');
}
btnOAMRollback.setEnabled(true);
btnOAMUpgrade.setEnabled(true);
}