Well, you also needed to set PatternStyle in even older versions with older APIs set, e.g
see the code segment below:
//Accessing the “A2” cell from the worksheet
cell=cells.getCell(“A2”);
style = cell.getStyle();
//Setting the foreground color to blue
style.setColor(Color.BLUE);
//Setting the background pattern to vertical stripe
style.setPatternStyle(PatternType._____);
//Saving the modified style to the “A2” cell.
cell.setStyle(style);
So, pattern setting was needed even if using the older APIs set in older versions too.
Let me explain what is the difference b/w foreground and back ground colors. Well, a user should always use ForegroundColor instead of using BackgroundColor method setters to get the cell’s Shading/fill color. For your knowledge, the Foreground color is the cell’s outline color and Background color is the back color of the cell. But, keeping in mind, if you want to set cell’s shading color with solid fill/pattern type, you will use ForegroundColor setter. There is no need to use Background color then that would be only useful if there is no solid/null background pattern type set for the cell.
Also, just for your knowledge we have ported .NET code to create Java version now since the release of version v7.0.0. The new APIs set of Java version is equally matched with .NET version with tremendous enhancements and performance.