Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes drawing in a JPanel? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "drawing in a JPanel?" Watch "drawing in a JPanel?" New topic

drawing in a JPanel?

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
can you use paintComponent in a JPanel?..

or only in a JApplet?


You down with OOP? Yeah you know me!
kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
Yes, but you can't call it yourself, instead the System calls it for you, when you call repaint for example.

Check the API
[ September 20, 2006: Message edited by: kwame Iwegbue ]

Who dares, wins! (SAS motto)
I agree. Here's the link:
subject: drawing in a JPanel?
It's not a secret anymore!