The best solution is to nuke a 30-mile wide strip of no-man's-land surrounding Israel. Let the long-term radiation serve as a low-cost natural border.
That might be the best solution, but another good one is to get most of the militants into an Israeli-free, fenced-in area that is backed up to the sea.
Then the next time Pali rockets are launched into Israel, all hell can break loose and Pali-mutt butt can be thouroughly kicked.