Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2171

Re: Swing thread problem

From "Felix Dorner" <felix.dorner@THRWHITE.remove-dii-this>
Subject Re: Swing thread problem
Message-ID <1185882121.597148.263230@22g2000hsm.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <dt2dnaZPNZTuVzPbnZ2dnUVZ_qKgnZ2d@comcast.com>
Date 2011-04-27 15:37 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hey,

thanks for your comments, and sorry for the missing imports..

I did write the example that way because even this senseless example
already has the same problem that has my real program (where commands
are read, interpreted, and actually something happens) I was surprised
by your responses that this works for you. Here=B4s again what just
happed whyn I run the example again:

The JFrame would not appear until I entered something at the
commandline. After that things work.

I now replaced the invokeLater with invokeAndWait - this works better,
the Frame shows up immediately and is responsive to moves / resizes.

It appears that when the program reaches the readLine() line the event-
dispatch-thread is somehow blocked by that readLine call. That is what
I do not understand.


Thanks,
Felix

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Swing thread problem "Felix Dorner" <felix.dorner@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
  Re: Swing thread problem "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
  Re: Swing thread problem "IchBin" <ichbin@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
    Re: Swing thread problem "Felix Dorner" <felix.dorner@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
      Re: Swing thread problem "Daniel Pitts" <daniel.pitts@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000

csiph-web