Re: Using SwingWorker with user interaction



Efi Merdler wrote:
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


I think I would make three SwingWorkers and after each is finished bring up a dialog and ask the user for the input that you need. Then proceed.

--

Knute Johnson
email s/nospam/knute/
.



Relevant Pages

  • Using SwingWorker with user interaction
    ... user interface, something that can be done quite easily using publish ... method,in addition I need to retrieve keyboard clicks which also ... I have a GUI and an engine that runs in the background ...
    (comp.lang.java.gui)
  • GUI framework for game/engine tools?
    ... supplementing a game engine. ... I've read many optimistic things about the near future of MFC as a GUI ... for example with .NET framework, but this is not tested, only an ...
    (comp.games.development.programming.misc)
  • Re: Forth as an operating system
    ... The major element missing is an GUI, ... SwiftX is a development system. ... graphical design of a user interface and maybe for tasks that are so ...
    (comp.lang.forth)
  • Re: Development tools for VMS
    ... > cell, GUI, browser)? ... your user interface w/o impacting your biz apps. ... >>either a VT character cell terminal or a PC running VT emulation. ...
    (comp.os.vms)
  • Re: Organization of GUIs
    ... Controller - your business logic ... View - Your gui, takes input ... The model is an interface defining the data to be displayed or otherwise acted upon in the user interface. ... Models are not data access objects; however, in very simple apps that have little domain logic there is no real distinction to be made. ...
    (comp.lang.python)