In this program we are going to create a sheet then create
oval then after set style of line and color.
The package we need to import is java.io.*,java.util.* ,org.apache.poi.hssf.usermodel.HSSFSheet,org.apache.poi.hssf.usermodel. HSSFPrintSetup, org.apache.poi.hssf.usermodel.HSSFPatriarch,org.apache.poi.hssf.usermodel.HSSFClientAnchor,org.apache. poi.hssf.usermodel.HSSFSimpleShape and org.apache.poi.hssf.usermodel. HSSFWorkbook.
The method used in this example shift row
This method is used to set the width of the liine.The value is coresponding 1pt=12700 or LINEWIDTH_ONE_PT
This method is used to set the line style.
This method is used to set color to the lines of this shape.
setLineStyleColor(int red,int green,int blue)
The color applied to the lines of this shape.
You can be used the following fields for color style
static int LINESTYLE_DASHDOTDOTSYS
static int LINESTYLE_DASHDOTGEL
static int LINESTYLE_DASHDOTSYS
static int LINESTYLE_DASHGEL
static int LINESTYLE_DASHSYS
static int LINESTYLE_DOTGEL
static int LINESTYLE_DOTSYS
static int LINESTYLE_LONGDASHDOTDOTGEL
static int LINESTYLE_LONGDASHDOTGEL
static int LINESTYLE_LONGDASHGEL
static int LINESTYLE_NONE
static int LINESTYLE_SOLID
static int LINEWIDTH_DEFAULT
static int LINEWIDTH_ONE_PT
The code of the program is given below:
The output of the program is given below:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.