protected void paintFigure(Graphics g) { super.paintFigure(g); Rectangle r = getTextBounds(); r.resize(-1, -1); r.expand(1, 1); r.width -= 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 g.drawLine(r.right() + 7, r.y + r.height / 2, r.right(), r.y); g.drawLine(r.right() + 7, r.y + r.height / 2, r.right(), r.bottom()); }