update slider for work with java9

@jacobsallan Can you check and add 'LGTM' ('looks good to be') if ok. Thanks Andy