What do you mean by "one after another"? JPEG only supports a single image per file. Do you want both images combined into a single one, possibly next to one another, or on top of each other? You'd have to use graphics to do that.
I think it is impossible to create a multi-page jpg file. But it is possible to create a multi-page tiff file. So if you convert the jpg's to tiff files this is no problem. To convert them you need to use the JAI API. I have the code to create multipage tiff files if you are interested.
Greetz,
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.