If your try to use a Class from the library your IDE should suggest the correct import statement. (May have to save first to see the suggestion)
Alternatively you can manually:
import some.lib.Class;
Edit: I've downloaded your linked jar, added it to a new project's Build Path and the following code gives no errors:
package test;
import net.sf.json.JSONObject;
public class TestJSON
{
JSONObject jsonObj;
public TestJSON()
{
jsonObj = new JSONObject();
}
}
Can you give us some erors, warnings or stacktraces please.
See this question for how to go about adding jars to your build path in Netbeans: How to add a JAR in NetBeans