Compontens over image...
Hi, guys.
I had a JFrame in which I put a background image using the paint(Graphics g) method.
When I put a JLabel (called lblNote in code bellow) over the image , the image background is lost by the JLabel background, that is gray.
My intention is that the JLabel background become transparent (just the letters appears over the JFrame background image).
The paint method code of JFrame:
publicvoid paint(Graphics g){
super.paint(g);
int x = (this.getWidth() - planoDeFundo.getWidth(null)) / 2;
int y = (this.getHeight() - planoDeFundo.getHeight(null)) / 2;
g.drawImage(planoDeFundo, x, y,this );
lblNote.repaint();
}
If I put lblNote.paint(g) instead lblNote.repaint() works fine, but the JLabel is rendered in (x, y) = (0,0) coordinates on JFrame (left top). I tried put the coordinates after that by the setLocation method, but the JLabel background turns gray again. :(
Someone can help me?
Thanks in advance!
PS: sorry for my poor english.

