In this example we are going to create a slide then change background of the master slide.
Change Background of Master Slide Using Java
In this example we are going to create a slide then change background of the master slide.
In this example we are creating a slide master for the slide show. To create slide show we are using SlideShow constructor and to create master slide we are using SlideMaster constructor. Then we are creating fill for setting background and for adding a picture. We are using getFill() to create the fill object. The setFillType(type) is used to set the type of fill. In this example, we are using picture type. Finally we are adding the picture into master slide in fill.
The code of the program is given below:
import org.apache.poi.hslf.HSLFSlideShow;
|
The output of the program is given below: