Solved

importing SwingWorker

Posted on 2007-12-05
12
333 Views
Last Modified: 2008-02-01
Hi,

How do you import SwingWorker? I can't compile my app, keeps complaining about this line:

import javax.swing.SwingWorker;

which I've taken from examples. I'm assuming it's because I have an old version of java or something?

Thanks
0
Comment
Question by:DJ_AM_Juicebox
  • 6
  • 4
  • 2
12 Comments
 
LVL 26

Expert Comment

by:ksivananth
ID: 20417832
you should be having Java 1.6 to use SwingWorker!
0
 
LVL 92

Expert Comment

by:objects
ID: 20417858
u can download it here

https://swingworker.dev.java.net/
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 20417872
I have version 1.6, just downloaded it 1 minute ago. Is there something else I could be missing?
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 20417878
check java -version to know the verion you use for run/compile app!
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 20417881
if it is different version, make sure you have installed 1.6 successfully and the path variable is updated accordingly!
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 20417884
Ok I am still pointing to javac here:

C:\Program Files\Java\jdk1.5.0_09\bin\javac.exe

but I don't have a 1.6 jdk folder, just:

    C:\Program Files\Java\jre1.6.0_03

and I don't see javac in there....
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 26

Expert Comment

by:ksivananth
ID: 20417890
then you would have downloaded JRE1.6 and installed. You have to download JDK1.6...
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 20417898
ok, where does one get it?
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 20417912
0
 
LVL 26

Expert Comment

by:ksivananth
ID: 20417917
or, here you can choose from one...

http://java.sun.com/javase/downloads/?intcmp=1281
0
 

Author Comment

by:DJ_AM_Juicebox
ID: 20425362
wait - if i compile with 1.6, does that mean users that only have the 1.5.9 or whatever JDK won't be able to see my applets? I mena is this stuff backwards compatible?
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 20425376
thats correct.

if you download just swingworker class and include that with your applet then your users will not need 1.6
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now