It could be possible with enough coding, but you would need more then one keyboard and mouse, a server set up, a computer able to run multiple copies of minecraft at the same time, and multiple accounts.
The graphics would suck though, and all of the requirements to do this would be a waste of time.
I saw someone post about a guy who did that recently but it was only a picture on reddit of his screen with both login sessions running and two players on each side of the screen. Only thing he said was he used the LAN to set it up. IMO the biggest obstacle is how would you enable controls for both players on the same PC?
I understand that this is quite the late response, but I'm simply spreading the word. I've written a guide on how to setup multiplayer on the same pc below. It allows for up to 4 players or more depending on how powerful the pc is.