--
Jess Holle
While the repaint manager checking for violations is a really useful
and easy to use techniques, Alexander Potochkin describes it alongside
other ways on his blog in the following article:
http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html
As a side note, in the podcast, a Posse member talked about
manipulating components before they were "realized" (or another term),
it seems today the current position from the Swing tutorial is to
always deal with components on the EDT, even during creation.
"Why does not the initial thread simply create the GUI itself? Because
almost all code that creates or interacts with Swing components must
run on the event dispatch thread. This restriction is discussed
further in the next section. " (extract from a subsection of
http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html)
What are your opinions on this, posse listeners ? How do you manage to
create a big new component while not blocking the UI doing so ?
Regards,
Louis
- Josh
On Jul 17, 5:53 pm, Joshua Marinacci <jos...@gmail.com> wrote:There are some repaint manager hacks you can install to help you test,I'll look into those. My respect for the swing team is still severely dampened by their inability to add this simplest of fixes that would clean up soooooooooo many headaches. What ARE the arguments for this contuining insistence on insanity anyway? Backwards compatibility? I don't think that should extend to code which is broken. Besides, you can always add a command line switch (-Djavax.swing.noThreadCheck) if people want to continue to run their 6 year old buggy java app as is, but on a newer VM.
Maybe there is some other mysterious reason I don't know of, but I
have looked more than once to find that (I nearly wrote "mysterical"
and in a way that might be suitable here -- something that alludes
direct observation and turns out to be rather silly in the end).
Peter