Solved

Make the process wait for feedback

Posted on 2007-11-29
3
386 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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:
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now