g.setColor(MetalLookAndFeel.getControl());
if (f.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); else g.setColor(MetalLookAndFeel.getControlShadow());
    public void paintBorder(Component c, Graphics g, int x, int y, int w,         int h)    {              JInternalFrame f = (JInternalFrame) c;      if (f.isSelected())        g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());      else        g.setColor(MetalLookAndFeel.getControlDarkShadow());            // fill the border background      g.fillRect(x, y, w, 5);      g.fillRect(x, y, 5, h);      g.fillRect(x + w - 5, y, 5, h);      g.fillRect(x, y + h - 5, w, 5);            // draw a dot in each corner      g.setColor(MetalLookAndFeel.getControl());      g.fillRect(x, y, 1, 1);      g.fillRect(x + w - 1, y, 1, 1);      g.fillRect(x + w - 1, y + h - 1, 1, 1);      g.fillRect(x, y + h - 1, 1, 1);            // draw the lines      g.setColor(MetalLookAndFeel.getBlack());      g.drawLine(x + 14, y + 2, x + w - 15, y + 2);      g.drawLine(x + 14, y + h - 3, x + w - 15, y + h - 3);      g.drawLine(x + 2, y + 14, x + 2, y + h - 15);      g.drawLine(x + w - 3, y + 14, x + w - 3, y + h - 15);            // draw the line highlights      g.setColor(MetalLookAndFeel.getControl());      g.drawLine(x + 15, y + 3, x + w - 14, y + 3);      g.drawLine(x + 15, y + h - 2, x + w - 14, y + h - 2);      g.drawLine(x + 3, y + 15, x + 3, y + h - 14);      g.drawLine(x + w - 2, y + 15, x + w - 2, y + h - 14);    }