One of the main benefits of filing bankruptcy is that it stops all lawsuits that have been filed against you, so yes, filing bankruptcy before a judgment is entered, will stop that judgment from being entered. Not only will it stop the judgment from being entered, it will eliminate the debt, so there's no chance of that creditor collecting on that debt in the future.