If you use C++, then, as capristo and IVAN devs suggest, use SDL - a library for graphics (and sound). SDL is portable, so works with Linux and others.
That's what I would use, but if you feel more comfortable with Java, or any other good language, then you could have success with that, too.