See my Barrier and Bars scenario.
Sorry, I realize that that scenario will not work because the lines are actors there.
To create a thicker line, you can draw multiple lines next to each other or create an image with dimensions of the thickness and length of the line, fill it with a color, rotate it as required and use 'drawImage'.
@Upupzealot, erdelf said he 'only need vertical and horizontal lines'. The method 'fillRect' of the GreenfootImage class is sufficient, as actinium said.