UIWindow and background images

I know the com.xith3d.userinterface package is not supported, but has anyone has any luck using a BufferedImage with transparency as a background image for a UIWindow?

I am using com.xith3d.loaders.texture.TextureLoader.getBufferedImageAlpha() to get the BufferedImage and UIWindow.getOverlay().setBackgroundImage() to set it. I can get the image to show with some minor UIWindow changes, but no transparency…

Has anyone else run into this problem? (and found a work-around?)

It works but I don’t have my source with me tonight…will post friday early PM

Thanks! I’d really appreciate it!

Here is a partial example, the image used is a gif with black as transparent

=================== create a UIManager ================================

if (windowMgr == null) {
try {
UIManager.setLookAndFeel(UIManager
.getSystemLookAndFeelClassName());
} catch (Exception a) {
a.printStackTrace();
}
windowMgr = new UIWindowManager(canvas); <===use your canvas Canvas3D
}

========================create, position a book page ============================

bookWindow = new BookPage(null, 256, 256, true, true); <====alpha blend/clip alpha true
windowMgr.addOverlay(bookWindow);
windowMgr.setPosition(bookWindow, x, y);
windowMgr.setVisible(toolsWindow, true); <===remember to set visible

=========================partial source ====================================

public class BookPage extends UIWindow implements ActionListener {

  FPSPanel1 panel;
   
  public BookPage(JComponent root, int width, int height, boolean clipAlpha,
              boolean blendAlpha) {
        super(width, height, clipAlpha, blendAlpha);
        w = width;
        h = height;

        img = TextureLoader.tf.getImageAlpha("images/parchment2.gif");  <===load as alpha

        panel = buildGUI(width, height);
        panel.setOpaque(false);   <====remember not opaque
        this.setRoot(panel);
  }

   

  private FPSPanel1 buildGUI(int width, int height) {

        FPSPanel1 p = new FPSPanel1();
        p.setLayout(null);// new BorderLayout());
        p.setDoubleBuffered(true);
        p.setOpaque(false);

        p.setSize(new Dimension(width, height));
        p.setLocation(0, 0);
        p.setBackground(Color.darkGray); 
        return p;
  }


  class FPSPanel1 extends JPanel {

        public void paint(Graphics g) {
              g.setFont(font);
               
              g.drawImage(img, 0, 0, w, h, null);  <===draw background
              g.setColor(Color.BLACK);
              Iterator it = lines.iterator();
               while (it.hasNext()) {   <===drawing text on bg alpha image
                    String p = (String) it.next();
                    g.drawString(p, 25, offset);
                    offset += 20;
              }
              //paint components
              this.paintComponents(g);
              super.paintChildren(g);
        }
  }

   </sub>

Got it working! Thanks!