Okay, all you Java programmers out there!  Here’s my first tutorial!  The last time I checked, there wasn’t a Java paint program out here yet, so hopefully I’m the first.  This tutorial will cover pretty much all of the code involved, so I guess this counts as a beginner tut.  So, in this program that we’ll be making(if you do it right), you’ll be able to draw on a blank white canvas, change the colors of your brush, and clear it!  Enough chat, let’s do it!



Things needed before-code:
Okay, so some things that you’ll need to do before the code is make an 16×16 GIF for each of the colors that we’ll have, so you’ll need a blue, green, magenta, black, and red GIF (create seperate GIFs.  It’s not that hard.  Just go to Microsoft Paint[if you’re using a Microsoft OS], make a 16×16 image and fill the canvas with that color).  Or, you could use mine, which are attached. =D

Remember to save the GIFs as the names of the GIFs in the code, or just change the code to fit your file names.



Something else to do(I guess you don’t have to, but I like to keep things organised), is to create a Paint folder and store all your code and images in it.

Now that you’ve done all that, we can get to the actual code =]



What Do You Think on This ? Say Here