how to set scrollbar to ui.table in sapui5?

I'm using ui.Table component and I want to add a scrollbar to my table for when all the columns don't fit on the screen, for example when the user shrinks the window to only half the screen. The api says the method navigationMode() is deprecated so I can't use it. I tried using "fixedColumnCount" which locks the columns I want when I shrink the screen so I can display only the necessary data. The problem with this is that there is white space added to the column even if I set a width to it. I tried putting the table inside a ScrollContainer but that didn't do anything. Does anyone have any suggestions?