Search code examples
javaeclipse-rcpnattable

NatTable flickers repeatedly on cell click and on scroll activity


I'm using a NatTable in an eclipse rcp based application. Whenever i click a cell or scroll the nattable flickers(may be on paint or redraw) repeatedly Is there a way to avoid this behavior?


Solution

  • From the Class NatTable i could find that SWT.DOUBLE_BUFFERED being used as one of the default style options.

    On adding SWT.DOUBLE_BUFFERED as a style option in my constructor,

    NatTable natTable = new NatTable(parentComposite, SWT.DOUBLE_BUFFERED); 
    

    i could find that the flickering is reduced.