Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

return value from GUI

Thread view: 
Richmond - 25 Jun 2007 10:57 GMT
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.
Roedy Green - 25 Jun 2007 12:13 GMT
On Mon, 25 Jun 2007 09:57:20 -0000, Richmond
<espositoriccardo@gmail.com> 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
Richmond - 26 Jun 2007 12:07 GMT
> >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 ;)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.