I agree with Waverick. The simplest way to do this with NetBeans is to add a custom target to your build.xml. (By the way, by virtue of using NetBeans, you are using Ant, since NetBeans uses Ant to build your jar file.)
Waverick's Ant target seems to be designed to merge the compiled code from a different NetBeans project into the current project's jar file. My targets below do exactly what you are looking for.
<target name="-unjar-and-copy-lib-jars">
<unjar dest="${build.classes.dir}">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<patternset>
<exclude name="META-INF/**"/>
<exclude name="/*"/>
</patternset>
</unjar>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar,-unjar-and-copy-lib-jars" name="fat-jar">
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<jar destfile="${dist.jar}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<echo>To run this application from the command line without Ant, try:</echo>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<echo>java -jar "${dist.jar.resolved}"</echo>
</target>
<target depends="clean,fat-jar" name="clean-and-fat-jar"/>
For more information on how to use this, see the blog post I wrote when I ran into the same issue.