Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

refreshing canvas

 
Dalibor Toth
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help me:
I have an applet class and canvas class. On applet load applet class reads values from a file (which is a database) and pass it to the canvas class which draws them. On user input, applet class gets inputed values, search the file accordingly, and send some other data to canvas. But canvas wouldn't repaint. Only when I minimize appletviewer window and maximize it again or when I pass some other window over it, it refreshes.
Q: How to force canvas to refresh?
Thanks!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
canvasRef.repaint();

-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic