if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING && a != TRAILING) throw new IllegalArgumentException("Invalid alignment.");
  public void setHorizontalAlignment(int a)  {    if (horizontalAlignment == a)      return;    int old = horizontalAlignment;    horizontalAlignment = a;        firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, old, a);        revalidate();        repaint();      }