@Override
    public void paintBorder(Component c, Graphics g, int x, int y,
                            int w, int h) {
      if (!(c instanceof JTextComponent)) {
        // special case for non-text components (bug ID 4144840)
        if (c.isEnabled()) {
          drawFlush3DBorder(g, x, y, w, h);
        }
        else {
          drawDisabledBorder(g, x, y, w, h);
        }
        return;
      }

      if (c.isEnabled() && ((JTextComponent)c).isEditable()) {
        drawLineBorder(g, x, y, w, h);
      }
      else {
        drawDisabledBorder(g, x, y, w, h);
      }
    }
@Override
    public void paintBorder(Component c, Graphics g, int x, int y,
                            int w, int h)