bg = inactiveBGColor;
bg = notSelectedTitleColor;
  protected void paintTitleBackground(Graphics g)  {    Color saved = g.getColor();    Dimension dims = getSize();    Color bg = getBackground();    if (frame.isSelected())      bg = activeBGColor;    else      bg = inactiveBGColor;    g.setColor(bg);    g.fillRect(0, 0, dims.width, dims.height);    g.setColor(saved);  }