Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » embedded AWT canvas not always repainted
embedded AWT canvas not always repainted [message #441029] Tue, 10 August 2004 12:01 Go to next message
Elmar Bartowitsch is currently offline Elmar BartowitschFriend
Messages: 10
Registered: July 2009
Junior Member
Hi,

I have a big problem with the bridging between AWT and SWT. I use
SWT_AWT.new_Frame to embed an AWT canvas in my Composite subclass
(actually, the canvas is embedded in the AWT frame returned by
new_Frame). When a repaint event of my class occurs, I draw to the
Graphics of the AWT canvas. This works very well as long as the main
window containing the Composite is not resized. If it IS resized,
sometimes it works too, while sometimes the canvas is just filled with
its background color (although the rendering to it was performed).

Thanks!
eb
Re: embedded AWT canvas not always repainted [message #441130 is a reply to message #441029] Tue, 10 August 2004 16:14 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/snippits/snippet155.html

WORKSFORME

"Elmar Bartowitsch" <my.email.address.is.fhs-hagenberg@gmx.at> wrote in
message news:cfada9$n8g$1@eclipse.org...
> Hi,
>
> I have a big problem with the bridging between AWT and SWT. I use
> SWT_AWT.new_Frame to embed an AWT canvas in my Composite subclass
> (actually, the canvas is embedded in the AWT frame returned by
> new_Frame). When a repaint event of my class occurs, I draw to the
> Graphics of the AWT canvas. This works very well as long as the main
> window containing the Composite is not resized. If it IS resized,
> sometimes it works too, while sometimes the canvas is just filled with
> its background color (although the rendering to it was performed).
>
> Thanks!
> eb
Re: embedded AWT canvas not always repainted [message #441183 is a reply to message #441130] Wed, 11 August 2004 11:55 Go to previous message
Elmar Bartowitsch is currently offline Elmar BartowitschFriend
Messages: 10
Registered: July 2009
Junior Member
Thx a lot, works for me too :)
Previous Topic:XTestFakeKeyEvent
Next Topic:How to propagete parent Event Listener?
Goto Forum:
  


Current Time: Thu Dec 18 13:45:57 GMT 2014

Powered by FUDForum. Page generated in 0.03807 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software