aspose file tools
The moose likes Swing / AWT / SWT and the fly likes SWT Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "SWT" Watch "SWT" New topic
Author

SWT

BBird
Greenhorn

Joined: Nov 01, 2004
Posts: 6
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!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: SWT
 
Similar Threads
Most efficient way to use a spritesheet?
SWT: refresh the canvas
How does canvas, an exteded JPanel obj have methods getSize(), createImage(size.width, size.height)?
Canvas
Problem in refresh the display