• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with Jpanel

 
shashi kale
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

-Nate
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic