This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to load swingX component class

 
Adam Nottingham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just downloaded a weekly build of swingX-WS. After unzipping in my project folder I added it to the project in netbeans. However when I try to drag-and-drop any component I get the error:

Cannot load component class org.jdesktop.swingx.JXMapKit from a project:
The class must be compiled and must be on the classpath of the project to which the form belongs.


Any ideas or help is greatly appreciated.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adam,
Welcome to the Ranch.

Obvious questions:
1) What you have downloaded, are you sure those are class files and not source files? If they are source (java) files, you will need to compile them.
2) I do not use Netbeans. In eclipse, even if I physically place some third party jar inside my project, I still need to explicitly need to add that jar to the class path. Does netbeans have anything similar?

Your question seems more to be IDE related than Swing related. I will move it over to the proper forum for you.
 
Adam Nottingham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Maneesh.

1) I have downloaded the jars which, in-turn, contains all of the class files needed. I have added the three needed jars to my library.
2) Yeah I'm considering just switching back to eclipse. I'm not entirely sure about the classpath, I'm doing some research now.

By the way the IDE is Netbeans 6.8
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found http://java.sun.com/developer/onlineTraining/tools/netbeans_part1/
If you scroll down a bit, there is a box on the right hand side of the page titled "Managing the Classpath".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic