Color savedColor = g.getColor(); Rectangle b = SwingUtilities.getLocalBounds(this); g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); g.fillRect(b.x, b.y, b.width, b.height); MetalUtils.fillMetalPattern(g, b.x + 4, b.y + 2, b.width - paletteCloseIcon.getIconWidth() - 13, b.height - 5, MetalLookAndFeel.getPrimaryControlHighlight(), MetalLookAndFeel.getBlack());   Dimension d = getSize(); g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);  g.setColor(savedColor);
  public void paintPalette(Graphics g)  {    // FIXME:  needs implementing    // most likely this is equivalent to paintComponent(g) when the isPalette    // flag is true  }