aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes No use of EDT in SCJD book? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "No use of EDT in SCJD book? " Watch "No use of EDT in SCJD book? " New topic
Author

No use of EDT in SCJD book?

Norbert Lebenthal
Ranch Hand

Joined: Sep 23, 2010
Posts: 74
Hi

I'm all new to Swing, but from what I got of it one should care of rightly using the EDT.

However, the SCJD book hardly speaks of it. Is the SCJD some case of special use case where using the EDT could be avoided ?

best
norbert
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4914
    
  10

Hi Norbert,

First of all, EDT = Event Dispatch Thread (for those who don't know the abbreviation).

Secondly the GUI you need to create for this assignment is quiet simple and limited, I didn't have used it in my assignment as far as I know, so that's why it's not (or hardly) mentioned in the book.

Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
David Byron
Rancher

Joined: Jan 20, 2009
Posts: 169

Another way to look at it: user gestures passed through the OS already reach your event listeners on the EDT, so updates to the GUI from within those listeners already tacitly run in the right place.

Depending on your implementation details, you might need to update the GUI by passing a runnable into a SwingUtilities method for later invocation.


SCJD 6, Baroque Potion, G+
Norbert Lebenthal
Ranch Hand

Joined: Sep 23, 2010
Posts: 74
in the end I'm clueless about the EDT, apart having heard of it, so details like the ones from David Byron are a bit obscure to me.

if the certif can be obtain without taking specific care of the EDT, all the better then. I'm a bit surprised though because not taking care of the EDT is normally a recipe for disaster in bigger applications (once again, from what I read), from slow perf to randow multithreading issues.

AFAIK, the substance L&F (https://substance.dev.java.net/) even takes extra steps to make sure the user doesn't do too much crap. If I was to properly implement the EDT, I would dig into their recommendations.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4914
    
  10

I had a look into my GUI-code, no references at all to SwingUtilities. Like I already said before: the GUI is very simple and limited, so it makes no sense to compare with fully-fledged professional desktop applications.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No use of EDT in SCJD book?
 
Similar Threads
Can I use Swingworker (jdk 1.6.0_03) ?
Thread safe GUI
Eclipse formatter and checkstyle configurations
Passed SCJP want to go for SCJD Need some help..
Sluggish GUI