From: jason on
hello!

just downloaded swing worker.

i up until now have not needed any external libraries for any of my
projects.

how do i go about adding this? if this is very dumb and is easily
solved with a link, please let me know. if i could find it by googling
i think i would have already as i tried for a bit.

thanks!
From: John B. Matthews on
In article
<14bb221c-a9d0-46f5-a82a-d1d4e1141604(a)p17g2000vbe.googlegroups.com>,
jason <jason.mellone(a)gmail.com> wrote:

> just downloaded swing worker.
>
> i up until now have not needed any external libraries for any of my
> projects.
>
> how do i go about adding this?

Adding this to what? What JVM version are you targeting? What build
environment are you using? Have you tried this?

<http://groups.google.com/group/comp.lang.java.programmer/msg/9b707988630265cd>

> if i could find it by googling i think i would have already as
> i tried for a bit.

You should still try. Without knowing what you found or tried, it's
hard to suggest a way forward. For Java 5, download
swing-worker-src-1.2.zip from <https://swingworker.dev.java.net/>.

$ unzip swing-worker-src-1.2.zip
Archive: swing-worker-src-1.2.zip
creating: ...

Then run the demo outlined in the SwingWorker API:

<http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html>

$ ant demo
Buildfile: build.xml

init:
[mkdir] Created dir: ...

compile:
[javac] Compiling 3 source files to ...

demo:
[javac] Compiling 1 source file to ...

BUILD SUCCESSFUL
Total time: 10 seconds

Use ` ant -p` to see other build targets.

SwingWorker is included in Java 6 and later.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: markspace on
jason wrote:

> just downloaded swing worker.

> how do i go about adding this? if this is very dumb and is easily
> solved with a link, please let me know. if i could find it by googling
> i think i would have already as i tried for a bit.


This is a little on the dumb side. Do you know what the Java API is?
It's the stuff that comes with both the JRE (runtime) and the JDK
(development kit). If you see it in Sun's basic documentation, then you
already have it.

Therefore, exactly what problem are you having? As always please
provide an SSCCE.

From: jason on
On May 15, 12:07 pm, markspace <nos...(a)nowhere.com> wrote:
> jason wrote:
> > just downloaded swing worker.
> > how do i go about adding this? if this is very dumb and is easily
> > solved with a link, please let me know. if i could find it by googling
> > i think i would have already as i tried for a bit.
>
> This is a little on the dumb side.  Do you know what the Java API is?
> It's the stuff that comes with both the JRE (runtime) and the JDK
> (development kit).  If you see it in Sun's basic documentation, then you
> already have it.
>
> Therefore, exactly what problem are you having?  As always please
> provide an SSCCE.

okay, to answer all of your questions at once:

i am trying to run this code exactly:
http://java.sun.com/docs/books/tutorial/uiswing/examples/concurrency/FlipperProject/src/concurrency/Flipper.java

when i run it using the launch button here:
http://java.sun.com/docs/books/tutorial/uiswing/concurrency/interim.html

it runs perfectly.

when i bring it into net beans (i am running verison 6.8:
http://netbeans.org/downloads/index.html i am using the bundle with
all possible technologies). i am running Java JDK 1.5

now, when i download and unzip this file it is all present in my
download file (running on a mac).
if i bring this code into my netbeans developer i get the following
error:
import javax.swing.SwingWorker; //line with error

error:
cannot find symbol
symbol: class swing worker
location: package javax.swing

i am assuming this is because my netbeans is not acknowledging the
file. and i agree, i haven't bridged this in any way.

i agree it is obvious i am not too sure what i am talking about. i am
honestly trying here, and if there is anything i can do to help you
help me try and be patient.

thanks in advance.
From: markspace on
jason wrote:
> i am running Java JDK 1.5

The SwingWorker documentation says:

Since:
1.6

Download the latest JDK and add it to the NetBeans platform. Then
change your project properties to use Java 1.6.