Solved

Make the process wait for feedback

Posted on 2007-11-29
3
397 Views
Last Modified: 2013-11-23
HI everyone

  I am trying to achieve something like following and am not sure how to proceed..

  i have a GUI for image analysis and in one instance of SwingWorker (when process button is clicked), i show a image to the user and i need to store the feedback of user for that image, but i need my process to wait for the user answer and set some values based on the feedback and

  after getting the feedback, continue with the process or do some calculations and it repeats..

 any pointers to achieve this .. or links?

 
0
Comment
Question by:max_dub
  • 2
3 Comments
 
LVL 24

Expert Comment

by:sciuriware
ID: 20375628
The feedback from the user is just an Event fired into 'actionPerformed()'

So, you must not wait, but let the Event happen.

;JOOP!
0
 

Author Comment

by:max_dub
ID: 20375721
hmm,

by feedback i mean, the user click on image and sets a value whether its relevant or not for the algorithm

and while this is taking place, the algorithm in the background should wait for the value to be set

and once it has the value; we proceed with the algorithm,,

can u explain ur answer a bit, am kind of confused?
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 500 total points
ID: 20380259
Every user response has the shape of an Event (e.g. a button-click).
If you know how to process a button-click, then you know how
to handle any event, from timer firing till mouse Events.
No polling or waiting, just set everything ready and let the 'actionPerformed()' do the work.

;JOOP!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
split string containing \r\n in Java 46 43
javap not working 8 44
arguments to jar 5 26
Glassfish admin console not working 1 10
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question