From: Nigel Wade on
On Fri, 14 May 2010 09:21:41 -0700, jason wrote:

> it is difficult to explain something one is new to, and something that
> one is expanding exposure to. it is easy to express a finite lexicon of
> proper terms once one's exposure is complete. in the process of exposure
> it is a bit difficult. ie: it is very easy to get the correct search
> results when the proper terms are used.
>
>

I think you would benefit greatly from reading the fine Java Tutorial
series at
http://java.sun.com/docs/books/tutorial/index.html.

I think it's a great place for any self-taught learner to begin. It will
start you off in the right direction with the correct terminology and
methodology of Java.

With regard to your specific problem, you are (in common with most
beginners to the subject) having a problem getting to grips with the the
threads used within Java, and in particular threads used by Swing. This
is hardly surprising, threads are not a simple concept to understand, and
the event driven thread used by Swing doesn't make life simple. The above
mentioned tutorial should help you in this regard, in particular the
Swing tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
which has a whole section on concurrency (threads). There is also a sub-
section about progress bars which should address your specific need, but
a basic understanding of concurrency in Swing will make reading that
section easier.

--
Nigel Wade

From: Lew on
jason wrote:
>> it is difficult to explain something one is new to, and something that
>> one is expanding exposure to. it is easy to express a finite lexicon of
>> proper terms once one's exposure is complete. in the process of exposure
>> it is a bit difficult. ie: it is very easy to get the correct search
>> results when the proper terms are used.
>

Nigel Wade wrote:
> I think you would benefit greatly from reading the fine Java Tutorial
>

Nice citation! ("Read the <<fine>> ...")

> series at <http://java.sun.com/docs/books/tutorial/index.html>.
>
> I think it's a great place for any self-taught learner to begin. It will
> start you off in the right direction with the correct terminology and
> methodology of Java.
>
> With regard to your specific problem, you are (in common with most
> beginners to the subject) having a problem getting to grips with the the
> threads used within Java, and in particular threads used by Swing. This
> is hardly surprising, threads are not a simple concept to understand, and
> the event driven thread used by Swing doesn't make life simple. The above
> mentioned tutorial should help you in this regard, in particular the
> Swing tutorial:
>  <http://java.sun.com/docs/books/tutorial/uiswing/TOC.html>
> which has a whole section on concurrency (threads). There is also a sub-
> section about progress bars which should address your specific need, but
> a basic understanding of concurrency in Swing will make reading that
> section easier.
>

On threading issues in general, and Swing threading in particular, the
book /Java Concurrency in Practice/ by Brian Goetz, et al., is superb.

It's one of two books on Java on which one should spend their hard-
earned ducats, the other being /Effective Java/, 2nd ed., by Joshua
Bloch (who's also a co-author of JCIP).

GUIs in general, not just Swing, have to handle their actions in a
single thread to be safe and effective. See
<http://weblogs.java.net/blog/kgh/archive/2004/10/
multithreaded_t.html>
which is referenced from the tutorial to which Nigel linked.

RTFM (or as Nigel said, RTFJT).

--
Lew