This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem with Jpanel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem with Jpanel" Watch "problem with Jpanel" New topic

problem with Jpanel

shashi kale

Joined: Sep 26, 2001
Posts: 7
I have one Jpanel in that i'm drawing the grapg in its paintcompoent() method.after 5min. i fetch new data from text file and again drawing the graph this is the scienory,
but problem is it wont go to the paintcomponent methd at all that means i'm not able to repaint it.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Are you calling paint(), paintComponent(), or repaint() to do the updating? Calling repaint() is usually the preferred way to update the graphics... It would also really help if you posted the code you are using...


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: problem with Jpanel
Similar Threads
paint method problem
Tree and drawing within the same panel
problem in paint method.
image transperancy
Displaying Graph in JSP