bgr demo code nowayoucanswerthis

im tired of searching please helpnow i got this code that draws cool fire and it is java applet.i would like to put it in background of my page so the pictures and text is over it. but i can only put colour or gif or bmp...HELPanybody
[276 byte] By [allscreennamesarealreadytaken] at [2007-9-30 4:12:55]
# 1

import java.awt.*;

import java.awt.event.*;

import java.io.*;

import java.util.*;

import javax.swing.*;

public class X extends JPanel {

private static final long serialVersionUID = 0L;

private javax.swing.Timer timer = null;

private Random rand = new Random();

public X(LayoutManager layout) {

super(layout);

}

//just is a dumb example, but you get the idea

//you may want to suspend animation when the window is iconified or deactivated

protected void paintComponent(Graphics g) {

super.paintComponent(g);

g.setColor(getBackground());

g.fillRect(0,0,getWidth(),getHeight());

if (timer == null) {

timer = new javax.swing.Timer(500, new ActionListener(){

public void actionPerformed(ActionEvent evt) {

setBackground(new Color(rand.nextInt(0x1000000)));

//repaint();

}

});

timer.start();

}

}

public static void main(String[] args) throws IOException {

Container cp = new X(new BorderLayout());

JTextArea area = new JTextArea();

area.setOpaque(false);

area.read(new FileReader("X.java"), null);

JScrollPane sp = new JScrollPane(area);

sp.setOpaque(false);

sp.getViewport().setOpaque(false);

cp.add(sp);

JPanel south = new JPanel();

south.setOpaque(false);

south.add(new JButton("ABC"));

south.add(new JButton("DEF"));

south.add(new JButton("GHI"));

cp.add(south, BorderLayout.SOUTH);

JFrame f = new JFrame("X");

f.setContentPane(cp);

f.setSize(300,200);

f.setLocationRelativeTo(null);

f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

f.setVisible(true);

}

}

DrLaszloJamf at 2007-7-1 12:17:39 > top of Java-index,Security,Cryptography...