When is it recommended to use Java Advanced Imaging (JAI) instead of the Java 2D API?
Basically it depends on the requirements of the program.
If I were able to do the required graphics with Java 2D, then I did so. But if I needed more advanced graphical capabilities then I would import the JAI package and convert my buffered image to a planar image and do what I needed.
Which brings me to another point.. if you wish to use images other than gif, jpg, or png, your only options (that I know of offered by SUN) are JIMI, and JAI. JAI offers a lot more then JIMI but does seem to use up a lot more memory and processing time. JIMI also is supposed to be jdk 1.1 compliant which could be a plus if you have to use a older jdk.
JAI also provides more information on the images then Java2D does, so if you need that info once again you might be better off with JAI.