Hello guys, i need help I creating a program that will transfer, or write the jPanel to MS word.

the jPanel contains all the needed label for the program then I want it to save to Ms word as image.. so that when I open the ms word I see a image (jPanel).

Im in trouble please feel free to change or correct my codes:

public void setJPanelToSave(Component component){
//File file = new File("saveToThisFile.jpg"); -> only works with image format such: .jpg, .bmp, .png

//but when I open in .doc theres a conversion error
File file = new File("saveToThisFile.doc");
BufferedImage image = generatedBufferedImage(component);
try {
ImageIO.write(image, "jpg", file);
} catch (IOException e) {
e.printStackTrace();
}
}

public BufferedImage generatedBufferedImage(Component component){
BufferedImage image = new BufferedImage(component.getWidth(), component.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();
g.fillRect(0, 0, image.getWidth(), image.getHeight());
component.print(g);
g.dispose();
return image;
}