I am trying to achieve a Excel like functionality in a `TableViewer` to draw a rectangle in a highlighted cell. Below is the code snippet doing this work, but it is not working completely as only left and top edges are getting drawn and I am not able to understand why the bottom and right edges are getting missed!

Code snippet : 

```
private void markFocusedCell(Event event, ViewerCell cell) {
        GC gc = event.gc;

        event.gc.setAlpha(200);
        event.gc.setForeground(event.display.getSystemColor(SWT.COLOR_RED));

        Rectangle rect = cell.getBounds();

        gc.drawRectangle(rect.x, rect.y, rect.width, rect.height);
        event.gc.setForeground(event.display.getSystemColor(SWT.COLOR_BLACK));

        event.detail &= ~SWT.SELECTED;
    }

```

Output 

![enter image description here](https://i.stack.imgur.com/nw5lo.png)