printing bufferedImage from code

Hey I am using a bufferedImage like so:


GraphicsConfiguration gc = saveArea.getGraphicsConfiguration();
            //created buffered image of dimension same as plot to be saved
            BufferedImage bimg = gc.createCompatibleImage(saveArea.getWidth(), saveArea.getHeight());
            saveArea.paint(bimg.getGraphics()); //puts canvas into buffered image
            
            //used to set str to string to be saved as
            //the parameter 0 tells saveDialog XYPlot is being saved
            str = saveObj.getFilename(0);
            if (str != "null") {
                File imageFile = new File(str);
                ImageIO.write(bimg, "jpg", imageFile); //saves files
            }

I would like to have code to print this bufferedImage from code. Like on event of clicking a button, create bufferedImage and print. Instead of having to save image as bmp and then print from where you saved it, instead I would like to use java.