Re: Getting a result from a swing JDialog

2009-02-11 Thread Phlex
Tim Martin wrote: > Hi all, > ... > The JDialog contructor takes a parameter that will tell it to be a modal window. (ns cara.gui.dialog-test (:import [javax.swing JDialog JTextField JButton AbstractAction])) (defn- create-and-show [data-ref] (let [dialog (new JDialog (@data-ref :owner)

Re: Getting a result from a swing JDialog

2009-02-09 Thread chris
I would create a ref in the let statement that is launching the dialog. Then create a countdown latch and launch the dialog using SwingUtilities/invokeLater. Ensure the ref is set (dosync ...) and the latch is counted when the dialog is closed. Now you have a synchronous result from your asynch

Re: Getting a result from a swing JDialog

2009-02-08 Thread Jeffrey Straszheim
A JDialog is going to run on the GUI thread and you can't change that. There are various concurrency tools in Java that will give you what you want. The easiest is to wait create a SynchronousQueue. Check the Java API docs. On Sat, Feb 7, 2009 at 6:15 PM, Tim Martin wrote: > > Hi all, > > I w