I barre a B chord with my index and ring, with the pad of my thumb pressing the back of the neck like a classical player, and play the A, D, G, and B strings, or play it on the D, G, B and E strings with individual fingers, depending on how much bass or treble I want out of the sound in that particular instance.
If you're comfortable, you can also throw your thumb over to catch the A string at the second fret on that last method.
But that having been said, I don't play a straight B-chord very often. I'll usually go for some B-variant, depending on the "flavor" needed in a particular spot in a song. Get a chord book and try out some of the various forms of B and see how they fit in a song. You might find one that actually works better and is easier to fret.
I play a fair amount of jazz when I'm not playing rock or country, and I've been playing for over thirty-eight years, so I've got a rather large number of chord options floating around in my head.
It takes awhile, but learning how to construct chords can make life a lot easier, too. I do that sometimes if I can't think of one I know that will work. Theory isn't half as hard as a lot of people think it is.