Reversible-jump Markov chain Monte Carlo may be used to fit scatterplot data with cubic splines having unknown numbers of knots and knot locations. Key features of the implementation investigated here are (i) a fully Bayesian formulation that puts priors on the spline coefficients and (ii) Metropolis-Hastings proposal densities that attempt to place knots close to one another. Simulation results indicate this methodology can produce fitted curves with substantially smaller mean squared-error than competing methods. The reversible-jump implementation requires ratios of marginal densities for the data (integrated likelihood ratios). We approximate these using the Bayes Information Criterion and thereby obtain a general approach to Bayesian nonparametric regression for arbitrary response-variable distributions. We illustrate with an application to Poisson nonparametric regression modeling of neuron firing patterns.