public static void drawButtonBorder(AbstractButton b,Graphics g,Shape shape){
  Graphics2D g2=(Graphics2D)g;
  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
  if (b.isEnabled()) {
    if (b.hasFocus()) {
      g2.setColor(Colors.BUTTON_BORDER_FOCUS);
    }
 else {
      g2.setColor(Colors.BUTTON_BORDER);
    }
  }
 else {
    g2.setColor(Colors.BUTTON_BORDER_DISABLED);
  }
  g2.draw(shape);
}

public static void drawButtonBorder ( AbstractButton b , Graphics g , Shape shape ) { Graphics2D g2 = ( Graphics2D ) g ; g2 . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; if ( b . isEnabled ( ) ) { if ( b . hasFocus ( ) ) { g2 . setColor ( Colors . BUTTON_BORDER_FOCUS ) ; } else { g2 . setColor ( Colors . BUTTON_BORDER ) ; } } else { g2 . setColor ( Colors . BUTTON_BORDER_DISABLED ) ; } g2 . draw ( shape ) ; }
draws the given button border with the specified shape .
