slider the java part