flickering of image in SWT
I am building an SWT application, I have used a ScrolledComposite
and a Composite
inside that. This has a few more buttons and checkboxes . All this is inside a Composite
.
Now I tried to put this main composite in the tab. It worked fine but the image flickers a lot even if I don't scroll or resize. If I put this main composite inside a shell, its working perfect without any flicker.
Why is this开发者_高级运维 happening?
Did you set the SWT.DOUBLE_BUFFERED
style bit on your Composite? That might fix it.
Write SWT.DOUBLE_BUFFERED
in declaration
Example:
scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.DOUBLE_BUFFERED);
精彩评论