A way to find integer line segments is using Pythagorean triples, that is, positive integers that are consistent with the Pythagorean theorem, for example, (3,4,5) because we have

therefore, they can be put in a triangle like this
Therefore, the slanted segment would have a length of 5. That can be done with other Pythagorian triples like (5,12,13) or (8,15,17).