title: How to add image with border into table cell in Word with Apache POI?
body: <p>I am trying to insert a picture with a border into a table in Microsoft Word with Apache POI. I am able to add an image into a cell with the code below:</p>
  
  <pre><code>// table is a XWPFTable object instantiated earlier in the code
  XWPFParagraph paragraph = table.getRow(0).getCell(0).addParagraph();
  XWPFRun run = paragraph.createRun();
  FileInputStream fis = new FileInputStream("C:\\ [filepath for the image]");
  run.addPicture(fis, XWPFDocument.PICTURE_TYPE_PNG, "Name", 6217920, 3474720);
  </code></pre>
  
  <p>I tried looking for ways to add a border to the image, but I haven't been able to find any resources online. I came across this link: <a href="https://stackoverflow.com/questions/42248697/format-picture-with-fill-and-line-using-apache-poi-in-java">Format Picture with Fill and Line using apache poi in Java</a> but it does not help in this case.</p>
  
  <p>(To be specific, I want to add a solid black line which is 2 1/4 pt thick around the image)</p>
  
  <p>Does anybody know how to do achieve this? Thanks in advance.</p>