tags:

views:

294

answers:

1

When I switch tabs in SWT, the content in the tabs flicker. This doesn't happen in my Swing version and is bugging me and my customers. What can I do to reduce this flicker?

+1  A: 

My team has found that excessive flickering can sometimes be due to too many calls to either redraw() or layout(). Try to find them, and remove unnecessary ones.

You can also temporarily turn off redraw if you're doing something that is graphics-intensive and don't care about the graphics being updated until the end. We do this with some complicated graphs and charts we have on our application; as long as all the data is drawn at the end, there's no need to do the intervening redraws while setting the information up.

http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/widgets/Control.html

Control has a setRedraw(boolean) method that can be used, for example.