Set Textbox in PowerPoint Slide Using Java
In this example we are going create textbox to set text in PowerPoint using java.
In this example we are creating an object of ShlideShow, after that we are using createSlide() method to create an object of Slide. To make a textbox we need first create an object of TexBox . Then by use of setText(String str) we can pass the string value in textbox. At last set the position and textbox size by use of setAnchor() method. Finally add it into slide by use of addShape(TexBox texbox).
The code of the program is given below:
import org.apache.poi.hslf.HSLFSlideShow;
|
The output of the program is given below: