Mercurial > hg > tema
changeset 13:ac5f1bc82b13
Fix the demo console initialization.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Tue, 24 Mar 2009 16:00:55 +0300 |
parents | 18c28b2b2f10 |
children | 992793931a2f |
files | src/kryshen/tema/Tema.java |
diffstat | 1 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/kryshen/tema/Tema.java Tue Mar 24 15:11:22 2009 +0300 +++ b/src/kryshen/tema/Tema.java Tue Mar 24 16:00:55 2009 +0300 @@ -22,6 +22,7 @@ package kryshen.tema; +import java.awt.EventQueue; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; @@ -34,6 +35,7 @@ import java.io.OutputStreamWriter; import java.io.PrintStream; import java.io.Writer; +import java.lang.reflect.InvocationTargetException; import java.nio.charset.Charset; import java.sql.SQLException; import kryshen.tema.demo.DemoFrame; @@ -73,7 +75,7 @@ public static void main(String[] args) throws IOException, SQLException, ClassNotFoundException, InstantiationException, - IllegalAccessException { + IllegalAccessException, InvocationTargetException { boolean demo = false; boolean version = false; @@ -133,10 +135,14 @@ } if (line.hasOption("demo")) { - // Open the demo console. - DemoFrame df = new DemoFrame(); - df.pack(); - df.setVisible(true); + EventQueue.invokeLater(new Runnable() { + public void run() { + // Open the demo console. + DemoFrame df = new DemoFrame(); + df.pack(); + df.setVisible(true); + } + }); return; }