int x = insets.left + (bounds.width - insets.left - insets.right - defaultSize) / 2; int y = insets.top + (bounds.height - insets.left - insets.right - defaultSize) / 2; paintTriangle(g, x, y, defaultSize, direction, isEnabled());
int size = bounds.height / 4; int x = (bounds.width - size) / 2; int y = (bounds.height - size) / 2; ButtonModel m = getModel(); if (m.isArmed()) { x++; y++; } paintTriangle(g, x, y, size, direction, isEnabled());
  public void paint(Graphics g)  {    super.paint(g);    Insets insets = getInsets();    Rectangle bounds = getBounds();    int x = insets.left            + (bounds.width - insets.left - insets.right - defaultSize) / 2;    int y = insets.top            + (bounds.height - insets.left - insets.right - defaultSize) / 2;    paintTriangle(g, x, y, defaultSize, direction, isEnabled());  }