From 2bf2a2dbb4d277a8591e27e6b24dd5a97ea6adfc Mon Sep 17 00:00:00 2001 From: pesckal Date: Thu, 11 Aug 2011 15:57:53 +0000 Subject: [PATCH] SwingUtilities.invokeLater for opening multiple instances --- app/src/processing/app/Base.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 7fea10019..94b82dea6 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -196,12 +196,16 @@ public class Base { if (platform.base == null) continue; if (key.equals(receivedKey)) { - String filename = br.readLine(); - if (filename != null) { - platform.base.handleOpen(filename); - } else { - platform.base.handleNew(); - } + final String filename = br.readLine(); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + if (filename != null) { + platform.base.handleOpen(filename); + } else { + platform.base.handleNew(); + } + }; + }); } } catch (IOException e) { }