I want to set my own backgroundcolor in XSSFWorkbook. So far i have this code:
style = wb.createCellStyle();
style.setAlignment(HorizontalAlignment.RIGHT);
style.setFont(itemFont);
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(128, 0, 128)));
styles.put("item_right", style);
But i got the following error:
The method setFillForegroundColor(short) in the type CellStyle is not >applicable for the arguments (XSSFColor)
The constructor XSSFColor(Color) is deprecated
So how can i set my own color in XSSFWorkbook ?