Given that the majority of suspected swine flu/H1N1 cases in the United States have been from people (Americans) returning from trips to Mexico, and not illegals sneaking under fences in Nogales, only a complete cessation of all air travel into the US and closing of all entry-points would have prevented this...assuming that you could have done it prior to any infected people returning to the US, most of whom were likely asymptomatic upon arrival.
However, now that it's known to be here, closing borders and such would prevent anyone else from bringing it back, significantly reducing the chance of it taking hold someplace it currently isn't.
However, to completely stop/significantly reduce the spread, you would have to stop all air traffic within the US and practically quarantine everyone to give it a chance to run its course. Considering the economic and social costs of this such a drastic action (how would food get transported between states, gasoline delivered to stations, etc.), this isn't going to happen.
If this near-pandemic runs similar to the 1918 flu, then it's in the fall when we'll really have to worry.