In this example we are going to create a slide then change background of the slide.
Change Background of Slide Using Java
In this example we are going to create a slide then change background of the slide.
In this example we are creating an object of the shape. In this object we assign rectangle shape and set the size and position. Initial values for x and y axis are 0.The height and width are 800 and 600 respectively. Then create an object of Shape and set values, fill type, background color and foreground color of the slide. Then finally add into slide. We are using setFillType(Fill.FILL_SHADE) method to set fill type, setBackgroundColor(Color.blue) method to set background color and setForegroundColor(Color.green) method to set the text color.
The code of the program is given below:
import org.apache.poi.hslf.HSLFSlideShow;
|
The output of the program is given below: