Hey, guys. I completed my school's C++ course and now I'm moving on to Java. Not a difficult transition, though I do have some questions. I have the basics with the console down, but that's gotten boring and I would like to make a game. As this will be my first game I decided to do something relatively simple: Tic Tac Toe. I have heard about Java's graphics abilites and how it is much easier than C++ and I must say that it is true.. I spent a few months last summer trying to learn the Win 32 API to make a graphical game but it was a pain in the butt. I researched Swing and have managed to use the JFrame to display my images, which I am storing in a JPanel. I am using the Image class to store my .jpg images. So far it's been coming along well. I load the images into a matrix of the Image type (3 by 3, like the real board). In the paintComponent function of my JPanel I draw all of the images. Everything loads correctly but when I explicity place an Image into the Images matrix it ends up in the wrong place.
Aside from that problem, I was wondering if this is a good way to go about building a graphics program. I plan to use all jpeg images.. I don't know anything fancy so I figured I'd just paint jpegs over jpegs and such. Has anyone else done simple graphical programs like this a different way?
Joined: Aug 09, 2003
Well, I figured out why the x and y numbers were switched.. when I drew the image I used x instead of y and it went over instead of down. I am still interested in other ways to do simple graphical programs, though.