First Java Applet: Logician
Posted 01-19-2010 at 04:57 AM by CoderMan
I wrote a little applet called Logician, which is similar to the game Master Mind. Hardly a unique applet, of course, but it was a good way for me to "warm up" and learn a lot of the API. It is available here:
http://indicium.us/cgi-bin/pages/get?view=log
One thing which took me by surprise, as far as Java programming goes, is that drawing to the graphics buffer, and then calling repaint(), is not the same thing as using double buffering. I had just assumed, having worked with ClanLib graphics in the past, that all graphics APIs would be set up this way by default. But in my Java applet I actually had to learn how to create a temporary buffer, draw to that buffer, and then transfer the temporary buffer to the real buffer.
http://indicium.us/cgi-bin/pages/get?view=log
One thing which took me by surprise, as far as Java programming goes, is that drawing to the graphics buffer, and then calling repaint(), is not the same thing as using double buffering. I had just assumed, having worked with ClanLib graphics in the past, that all graphics APIs would be set up this way by default. But in my Java applet I actually had to learn how to create a temporary buffer, draw to that buffer, and then transfer the temporary buffer to the real buffer.
Total Comments 0