Skip to main content

Is access to the older Swing tutorial still available somewhere?

8 replies [Last post]
jimgood
Offline
Joined: 2008-05-29

I'm stuck using 1.4.2 for a while yet and I need some references on concurrency that are geared toward that version. The current tutorial focuses on SwingWorker which is not available.

Any help would be appreciated. I'll even down load the whole thing if I have to.

Thanks,

Jim

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jimgood
Offline
Joined: 2008-05-29

Thanks for the replies. While waiting I found a solution. Not pretty, but it works and doesn't use threads. But having the older tutorial will help for some other things as well.

I can't wait 'til this big, bloated company I work for will allow us to come up to speed with the rest of the Java using world.

sfshaza
Offline
Joined: 2004-06-03

:-)

Glad you found a solution. Another way to get at the older tutorials is to pick up a used copy of The Java Tutorial (3rd edition or older) or The Swing Tutorial (the second edition covers 1.4). If you buy a copy that includes the CD you can get it online easily.

Not ideal, I know.

Sharon

sfshaza
Offline
Joined: 2004-06-03

Actually, here you go. I took the tutorial.zip file off the CD for the Swing Tutorial, Second Edition. It contains the entire snapshot of the Java tutorials as of 1.4:

tutorial_1.4.zip

Sharon

aberrant
Offline
Joined: 2006-02-02

@jimgood

There really isn't a good way to "block" the "main" thread. All Swing interaction (both models and components) needs to be done on the Event Dispatch Thread (EDT or SwingThread). SwingWorker was referenced in the JavaDocs well before it was included in the JDKL (1.6). https://swingworker.dev.java.net/ has links to the older and newer version of SwingWorker. It is considered bad to block the EDT for any reason as blocking it would stop the screen from painting. Hence SwingWorker exists as an asynchronous solution.

Here is an older article that should be relevant to 1.4.2.

http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html

Good luck,

Collin

jimgood
Offline
Joined: 2008-05-29

Collin, thanks. I know what you mean and I didn't really mean to say block. Poor choice of word. The program I'm writing has a bit of a 'wizard' approach but with the ability skip back and forth between steps a little differently. The main program needs to be able to start a window which prompts the user to perform some task and it will wait while until that task is complete before moving on to the next.

I'm trying to wade through the SwingWorker documentation at the links you provided because my other approach isn't really working. It's been so long since I've done any windows programming! Lots to relearn.

Message was edited by: jimgood

sfshaza
Offline
Joined: 2004-06-03

Hi Jim,

Here's a very old copy of the Swing tutorial. It contains the old threads lesson under uiswing/misc.

Sharon

jimgood
Offline
Joined: 2008-05-29

Thanks for your reply, Sharon. Unfortunately, that one is not old enough. The concurrency discussion still references javax.swing.SwingWorker, which was not a part of 1.4.2.

Frustrating because it's been 6 years since I've done any multi-threaded apps and I can't remember how to setup blocking in a main thread while a task in another thread completes.

If you have any reference or samples for this type of scenario in a Swing context, I'd really appreciate it.

sfshaza
Offline
Joined: 2004-06-03