i haven't attempted this, but if you can already programmatically create the zip file, you could then use the java.security and javax.crypto classes to encrypt the zip file using password based encryption (PBE). this would make it a two stage process, but it's a start. PBE info and example at: http://java.sun.com/products/jce/doc/guide/API_users_guide.html#PBE
use the [CODE] tags - it makes it much easier for people to help you.
subject: How create encrypted/password-protected zip file?