SWT Component flickers

267 Views Asked by At

I am working on an application which has an embedded browser and shows a camera window in a corner on that browser as shown in image. For showing browser below and camera pane above I have used JDesktopPane to create two layers one for browser another for camera window. I have used jxBrowser for showing the browser and camera window is basically AWT Pannel. Code for adding browser is below. Everything is ok but the problem is that when I scroll web page the camera pane flicker and even leaves traces on web page as shown in second image. I am not sure how to deal with this problem.

m_LayeredPane = new JDesktopPane();
m_LayeredPane.setLayer(browser.getComponent(), JLayeredPane.DEFAULT_LAYER);
m_LayeredPane.add(browser.getComponent());
m_LayeredPane.setLayer(camContainer, JLayeredPane.POPUP_LAYER);
m_LayeredPane.add(camContainer);

enter image description here

enter image description here

0

There are 0 best solutions below