how to force a paint on a specific panel

Hi,
   I have a problem painting on a specific panel. I need to draw lines on a panel. Do i pass the panel into the paint function and if so how do i force it to draw on this panel only.
ciaranhurstAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
allelopathConnect With a Mentor Commented:
Any JComponent has methods to paint, e.g.
paint(), repaint(), update()

http://java.sun.com/j2se/1.3/docs/api/javax/swing/JComponent.html
0
 
membershCommented:
try
panel.invalidate();
panel.validate();
panel.repaint();
0
 
CleanupPingCommented:
ciaranhurst:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
jimmackCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept allelopath's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.