public class MyFrame extends JFrame
{
class MyContentPane extends JPanel
{
public MyContentPane()
{
this.setOpaque( false ) ;
}
}
public void paint(Graphics g)
{
g.drawImage(backgroundImg.
super.paint( g ) ;
}
public static void main( String[] args )
{
MyFrame f = new MyFrame() ;
f.setContentPane( new MyContentPane() ) ;
}
}
Main Topics
Browse All Topics





by: zzynxPosted on 2005-03-07 at 02:09:54ID: 13475045
Maybe this can help you: iew.jsp?EI D=9691
How do I display an image in the background of a Swing component? http://www.jguru.com/faq/v