09-11-2004, 02:37 AM
|
#1
|
|
Member (7 bit)
Join Date: Sep 2004
Posts: 70
|
Importing Java packages with Netbeans
I took a course in Java last year, so I have the basics of Object-Oriented programming down, but I'm having trouble getting my own IDE setup at home. When I tried to "import" java packages with the IDE we had at school, I never had any problem. I'm trying to import some packages (specifically java.awt.event so I can get the KeyListener interface), and its not finding them. When I compile it says "cannot resolve class KeyListener". I have imported some other very basic packages like javax.swing.*, so I'm guessing that Netbeans doesn't come with all the j2sdk packages "installed"? I looked through my j2sdk folder and found all the folders with the .java classes from the Java API, but I don't know how to get them recognized by Netbeans so I can just type "import java.awt.event" and so on. I tried "mounting" the entire j2sdk folder, but it still gave me error messages. Am I on the right track? or is there something else I need to do? I've spent about 5 hours trying to find the answer before I gave up and decided to post on here. Any help is greatly appreciated!!!
***Edit: I think I figured it out. Somehow I was typing in my import statements incorrectly. I was typing "import java.awt.event" thinking it would import all the classes in that package/folder. DOh!
Last edited by bitTRL1000; 09-11-2004 at 02:53 AM.
|
|
|