• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SWT: refresh the canvas

 
BBird
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to refresh the canvas?
Is there any method to refresh the canvas?
-----------------------------------------

My case:
- The first group of images is loadded onto the canvas.
- When clicking the button to load the next group of those,...
- The second group of images is loadded onto the same canvas.

Condition:
- Two groups of images are displayed onto little canvas.
- Little canvas will later be displayed on (big) canvas.

Problems:
- The first group of images is supposed to disappear, but it is actually not!
- The second group normally appears, but it displays behind the previous pix.


My questions:
How to refresh the canvas?
Is there any method to refresh the canvas?
or
Is there any method to dispose little canvas?


This code is right, but it does not work on my program. I do not know why???...
if (canvasArray != null){
// clear existing array of canvas
for (int i = 0; i < canvasArray.length; i++)
{
canvasArray[i].dispose();
}
}

Do you have any suggestion?
Thanx!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic