This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes no paint() ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "no paint() ???" Watch "no paint() ???" New topic

no paint() ???

Rick Gentry
Ranch Hand

Joined: Dec 14, 2002
Posts: 63
I've created a new extension of the JComponent class and paint() isn't being called when it's run and repaint() doesn't do anything either. Any suggestions? I'll put in the code if someone feels like taking a look.

[ December 14, 2002: Message edited by: Rick Gentry ]
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9044

I suggest you move your c.add( ... ) to before you call the frame.setVisible().

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Rick Gentry
Ranch Hand

Joined: Dec 14, 2002
Posts: 63
Thanks, but I already figured that one out by myself. It all works now.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: no paint() ???
Similar Threads
[swing]highlight text on mouse over
Small event handling problem, need to implement a stop
2D graphic repaint() logic
click outside arc detector