flickering of image in SWT

喜欢而已 提交于 2019-12-23 01:13:42

问题


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?


回答1:


Did you set the SWT.DOUBLE_BUFFERED style bit on your Composite? That might fix it.




回答2:


Write SWT.DOUBLE_BUFFERED in declaration

Example:

scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.DOUBLE_BUFFERED);


来源:https://stackoverflow.com/questions/6958455/flickering-of-image-in-swt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!