How to make synchronize scroll between two table in vaadin 7?

I have two table in vaadin. One is as Table mainTable. Another is ScrollTable freezeTable. I need a synchronize scroll between two table. If i will scroll mainTable vertically the freezeTable should scroll as same but in case of horizontal scroll I don’t want any synchronize scroll. I got some idea from vaadin forum like belows. But I am unable to proceed because of some deprecated method.

In I am adding this two table as addComponent(loadTables()); public HorizontalSplitPanel loadTables(){ final HorizontalSplitPanel splitPanel = new HorizontalSplitPanel(); Table mainTable = new Table(); ScrollTable freezeTable=new ScrollTable(); freezeTable.setDependentTable( mainTable ); freezeTable.setWidth( "300px" ); mainTable.setWidth( "800px" ); freezeTable.setContainerDataSource(myContainer); freezeTable.setVisibleColumns(viscol); freezeTable.setColumnHeaders(vishead); freezeTable.setPageLength(15); mainTable.setContainerDataSource(myAnotherContainer); mainTable.setVisibleColumns(viscolmain); mainTable.setColumnHeaders(visheadmain); mainTable.setPageLength(15); splitPanel.setFirstComponent(freezeTable); splitPanel.setSecondComponent(mainTable); return splitPanel; } ScrollTable class is like this.

package; import; import com.vaadin.server.PaintException; import com.vaadin.server.PaintTarget; import com.vaadin.shared.ui.Connect; import com.vaadin.ui.Table; @SuppressWarnings("serial") public class ScrollTable extends Table{ private Table mainTable; public ScrollTable() { super(); } public void setDependentTable( Table mainTable) { this.mainTable= mainTable; } @Override public void paintContent( PaintTarget target ) throws PaintException { target.addAttribute( "scrollPane", this ); if ( table != null ) target.addAttribute( "dependentTable", mainTable); super.paintContent( target ); } } I have created another class VMyScrollTable and extend VScrollTable like this.

package; import; import; import; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.UIDL; import com.vaadin.client.ui.FocusableScrollPanel; import com.vaadin.client.ui.VScrollTable; import com.vaadin.shared.ui.Connect; @Connect( public class VMyScrollTable extends VScrollTable{ public VMyScrollTable() { super(); } @Override public void updateFromUIDL( final UIDL uidl, final ApplicationConnection client ) { super.updateFromUIDL(uidl,client ); final String tableId = uidl.getStringAttribute( "dependentTable" ); if ( tableId == null ) return; String id = uidl.getStringAttribute( "scrollPane" ); VScrollTable scrollPane = (VScrollTable) client.getPaintable(id); final FocusableScrollPanel scrollBody = (FocusableScrollPanel) scrollPane.getWidget(1); scrollBody.addScrollHandler( new ScrollHandler() { @Override public void onScroll( ScrollEvent event ) { VMyScrollTable.this.onScroll( event ); VScrollTable dependentPane = (VScrollTable) client.getPaintable(tableId ); FocusableScrollPanel scrollToBeBody = (FocusableScrollPanel) dependentPane.getWidget( 1 ); scrollToBeBody.setScrollPosition( scrollBody.getScrollPosition() ); } }); } } Here problem is
class have no method like
have no method like
. I am unable to proceed because of this. Any thing need to change in my code?? Please any body help me how to do this.

Is there a solution for this?

I have the updated freeze table. You can use it. Use the