We consider competition between antibiotic producing bacteria, non-producers (or cheaters), and sensitive cells in a two-dimensional lattice model. Previous work has shown that these three cell types can survive in spatial models due to the presence of spatial patterns, whereas coexistence is not possible in a well-mixed system. We extend this to consider the evolution of the antibiotic production rate, assuming that the cost of antibiotic production leads to a reduction in growth rate of the producers. We find that coexistence occurs for an intermediate range of antibiotic production rate. If production rate is too high or too low, only sensitive cells survive. When evolution of production rate is allowed, a mixture of cell types arises in which there is a dominant producer strain that produces sufficient to limit the growth of sensitive cells and which is able to withstand the presence of cheaters in its own species. The mixture includes a range of low-rate producers and non-producers, none of which could survive without the presence of the dominant producer strain. We also consider the case of evolution of antibiotic resistance within the sensitive species. In order for the resistant cells to survive, they must grow faster than both the non-producers and the producers. However, if the resistant cells grow too rapidly, the producing species is eliminated, after which the resistance mutation is no longer useful, and sensitive cells take over the system. We show that there is a range of growth rates of the resistant cells where the two species coexist, and where the production mechanism is maintained as a polymorphism in the producing species and the resistance mechanism is maintained as a polymorphism in the sensitive species.