[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] how to Display a gif image on editor
|
- From: spike.m@xxxxxxxxx (Satyam Shukla)
- Date: Tue, 28 Feb 2006 12:27:01 +0000 (UTC)
- Newsgroups: eclipse.tools.gef
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi Iam trying to display a "gif" image on editor whenever the user clicks
on the Particular Item on the palette.
But the image is not getting loaded , though the image is present in the
icon folder of my project
protected void paintFigure(Graphics g) {
super.paintFigure(g);
Rectangle r = getBounds();
Device dev = new Display();
Image img = new
Image(dev,getClass().getResourceAsStream("/icons/Start.gif"));
g.drawImage(img, r.x, r.y);
}
Any Suggestions or ideas are welcome.