Since nobody else seems to want to offer a suggestion I will have a go. The closest that I have ever come to this is a few sudoku-like puzzles, but for what it is worth here is how I would start.
I would draw the playing board on a canvas. The position of the "fences" and the start and end positions for the ball would need to be coded into a byte string in some way - then all the different "boards" could be set up in a file and drawn as required. That is not difficult - it is how I handled Killer Sudoku and this seems much simpler. I wouldn't even consider using an image for the board - much too much work to build a library of layouts.
Moving the ball around is more tricky - I have never tried anything like that. Could we put an image of the ball on to a round panel then move the panel across the canvas? I wouldn't know how to build a round image, but if that can be done that would be easier. The lines marking the board would have to be refreshed as the ball passed over them, but that is not difficult.
That is it, until someone has a better idea.