Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > return value from GUI

Reply
Thread Tools

return value from GUI

 
 
Richmond
Guest
Posts: n/a
 
      06-25-2007
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:
<pre>
if (!matchEqualsMethod) {
guiRequestPolicy.setVisible(true);
//here I need to set the int value
chooseValue =
guiRequestPolicy.getChooseValue();
//then do the request policy
this.processInteractivePolicy(chooseValue,
tmpCheckFileBD, tmpCheckFileSD, confrontPolicy, checkFileFilter,
logFile);
}
</pre>

Someone can help me!? How can I read the value...or where is my error?
I hope I was precise explaining my problem, thanks.

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-25-2007
On Mon, 25 Jun 2007 09:57:20 -0000, Richmond
<(E-Mail Removed)> wrote, quoted or indirectly quoted
someone who said :

>Someone can help me!? How can I read the value...or where is my error?
>I hope I was precise explaining my problem, thanks.


Normally this sort of thing is done with a JOptionPane.

See http://mindprod.com/jgloss/joptionpane.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Richmond
Guest
Posts: n/a
 
      06-26-2007
> >Someone can help me!? How can I read the value...or where is my error?
> >I hope I was precise explaining my problem, thanks.

>
> Normally this sort of thing is done with a JOptionPane.


I solved it setting the JDialog modal, so the method getChoosedValue()
has to wait since the dialog is open...thank you for the help and the
quick answer

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function take in value and return value CSINVA ASP .Net 6 11-07-2007 12:49 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM
GUI - GUI value passing paul.foreman Java 5 10-25-2004 08:06 AM
getting return value from function without return statement. Seong-Kook Shin C Programming 1 06-18-2004 08:19 AM
Return a return value from Perl to Javascript PvdK Perl 0 07-24-2003 09:20 AM



Advertisments