Hi, Josh,

You may want to call validate() on the JPanel after you add 
something to it.

Mingjian Song

> -----Original Message-----
> From: Josh Howe [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 4:56 PM
> To:   Java - Swing
> Subject:      repainting
> 
> 
> Hi,
> 
> I am new to Java and Swing. I am adding a JLabel to a JPanel dynamically
> in
> response to the user pressing a button. But when I add the label, I can't
> see it. I've tried calling repaint() on the JPanel, but no luck. Does
> anybody know how to do this? Thanks!
> 
> 
> 
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to