Using SwingWorker with user interaction



Hello,
I have a main GUI which uses a SwingWorker class in order to dispatch
a lengthy operation, this lengthy operation is required to update the
user interface, something that can be done quite easily using publish
method,in addition I need to retrieve keyboard clicks which also
causes the user interface to get updated.

In other words, I have a GUI and an engine that runs in the background
this engine needs to retrieve user interaction with the keyboard and
according to a keyboard click change the graphical interface.

My question is, should I divide the above operations (GUI and engine)
into two different threads, if so how do I make them share data
(keyboard --> engine engine --> gui) or maybe everything should run in
the same thread ?

What do you think ?

Thanks,
Efi

.



Relevant Pages

  • Re: Using SwingWorker with user interaction
    ... I have a main GUI which uses a SwingWorker class in order to dispatch ... user interface, something that can be done quite easily using publish ... I have a GUI and an engine that runs in the background ...
    (comp.lang.java.gui)
  • Re: IDE for C: KDevelop vs Emacs vs Other
    ... I spawn a search dialog in a GUI. ... using some of *my attention* moves of the okay button. ... Do you do agree keyboard interface takes ... and Lee stating that things should be all one way or the other. ...
    (comp.os.linux.development.apps)
  • Re: command line vs gui
    ... > command lines over GUI, ... Windows based Oracle. ... For me, it breaks down into not gui vs cli, but mouse vs keyboard. ... cli command is a series of carefully constructed txt options. ...
    (comp.os.linux.misc)
  • Re: IDE for C: KDevelop vs Emacs vs Other
    ... To do what you did above, I use a keyboard shortcut, I know that the ... sub-thread was about mouse vs. keyboard, not about GUI vs. non-GUI. ... >> I do this with emacs all the time. ... > to a case sensitive partial word search backwards w/o losing the term. ...
    (comp.os.linux.development.apps)
  • [OT] Tiered Applications [was Re: Learning]
    ... user interface, such as command-line driven, or full-screen based [i.e. ... Implementation of the engine component could prove interesting. ... Themselves call the data management functions / classes ... Naturally all the above variations can be implemented in C++:)! ...
    (alt.comp.lang.learn.c-cpp)