private Rectangle getSelectionRectangle() {
Rectangle bounds = getTextBounds();
bounds.expand(new Insets(1, 1, 1, 1));
translateToParent(bounds);
bounds.intersect(getBounds());
return bounds;
}
protected void paintFigure(Graphics graphics) {
graphics.fillRectangle(getBounds());