I use SwingPaintDemo2 from Java Tutorials:
I modified it like this:
public void paintComponent(Graphics g) {
super.paintComponent(g);
// Draw Text
g.drawString("This is my custom Panel!",10,20);
JLabel c = new JLabel("Label");
c.paint(g);
}
g.drawString works fine. But how can I paint JLabel from this method? It doesn't work.