if (tc.isEnabled() && tc.isEditable())
enabledTextBorder = tc.isEnabled() && tc.isEditable(); } else enabledTextBorder = false;  if (enabledTextBorder)
    public void paintBorder(Component c, Graphics g, int x, int y, int w,         int h)    {      JTextComponent tc = (JTextComponent) c;      if (tc.isEnabled() && tc.isEditable())        super.paintBorder(c, g, x, y, w, h);      else        {          Color savedColor = g.getColor();          g.setColor(MetalLookAndFeel.getControlShadow());          g.drawRect(x, y, w - 1, h - 1);          g.setColor(savedColor);        }    }