那问题难吗???
我没搞过可以起用
setbackcolor()

解决方案 »

  1.   

    这是图片的问题,所以要对那个图片处理。而不是放到Swing里边来做。
      

  2.   

    唉,晕啊晕啊public class UTImageFilter extends RGBImageFilter
    {
      private Color paintColor;  public UTImageFilter(Color c)
      {
       Assertor.notNull(c);
      
        canFilterIndexColorModel = true;    paintColor = c;
      }  public int filterRGB(int x, int y, int rgb)
      {
        DirectColorModel cm = (DirectColorModel)ColorModel.getRGBdefault();    int alpha = cm.getAlpha(rgb);    int red = paintColor.getRed();    int green = paintColor.getGreen();    int blue = paintColor.getBlue();    return alpha << 24 | red << 16 | green << 8 | blue;
      }
    }// call method
      public static Image getPaintImage(Image oldImg, Color c)
      {
        Assertor.notNull(oldImg);
        Assertor.notNull(c);    UTImageFilter imgFilter = new UTImageFilter(c);    Image newImg = null;    newImg =
          Toolkit.getDefaultToolkit().createImage(
            new FilteredImageSource(oldImg.getSource(), imgFilter));    return newImg;
      }
      

  3.   

    对了,把其中的Assertor都去掉