@Override
protected void paintFigure(Graphics g) {
super.paintFigure(g);
Rectangle r = getTextBounds();
r.resize(-2, 0).expand(1, 1);
r.x -= 2;
g.drawLine(r.x, r.y, r.right(), r.y); // Top line
g.drawLine(r.x, r.bottom(), r.right(), r.bottom()); // Bottom line
g.drawLine(r.x, r.bottom(), r.x, r.y); // left line