return value from GUI

Hi,

I'm modelling a sw that synchronize two directories, a part of it

must be interactive and I have a "problem".

In the algorithm of synchronization when I encounter a difference

between the two directories I ask to the user what he will do, I call

a JDialog and I need to read an int value representing the choise

(ignore, copy A to B, delete, ...).

The OK button of the Gui set in actionPerformed the value (selected

button), in the same class I put a method getChoosedValue that return

the int value...now, when i call the getChoosedValue() on the

guiRequestPolicy don't happen nothing.

I explain it better:

if (!matchEqualsMethod){

guiRequestPolicy.setVisible(true);

//here I need to set the int value

chooseValue = guiRequestPolicy.getChooseValue();

//then do the requested policy

this.processInteractivePolicy(chooseValue, tmpCheckFileBD, tmpCheckFileSD, confrontPolicy, checkFileFilter, logFile);

}

Someone can help me!? How can I read the value...or where is my error?

I hope I was precise explaining my problem, thanks.

[1340 byte] By [Richmonda] at [2007-11-27 8:43:37]
# 1
should work if the dialog is modal
Michael_Dunna at 2007-7-12 20:44:06 > top of Java-index,Desktop,Core GUI APIs...
# 2
> should work if the dialog is modalYes!!! It works...thanks for the help.Setting the JDialog modal my method getChoosedValue() wait since you close the dialog...
Richmonda at 2007-7-12 20:44:06 > top of Java-index,Desktop,Core GUI APIs...