In this tutorial i will show you how to make the .java file for a simple paint program and show you how to change the background/paint colours.
(this tutorial will not explain how to compile)

Ok so start up your text editor(e.g. notepad).
then copy and paste in the below code:

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class Paint extends Applet
implements MouseMotionListener {

int width, height;
Image backbuffer;
Graphics backg;

public void init() {
width = getSize().width;
height = getSize().height;

backbuffer = createImage( width, height );
backg = backbuffer.getGraphics();
backg.setColor( Color.black );
backg.fillRect( 0, 0, width, height );
backg.setColor( Color.blue );

addMouseMotionListener( this );
}
public void mouseMoved( MouseEvent e ) { }
public void mouseDragged( MouseEvent e ) {
int x = e.getX();
int y = e.getY();
backg.fillOval(x-10,y-10,20,20);
repaint();
e.consume();
}

public void update( Graphics g ) {
g.drawImage( backbuffer, 0, 0, this );
}
public void paint( Graphics g ) {
update( g );
}
}

and save this file as: (DO NOT SAVE AS ANYTHING ELSE)(CASE SENSITIVE)
Paint.java

now compile this code into a .class file and add it to a webpage to veiw.

now i will tell you how to change the colours.

BACKGROUND:
where it says this: backg.setColor( Color.black );
change where it says black to your desired background colour.

PAINT:
where it says this: backg.setColor( Color.blue );
change where it says blue to your desired paint colour.

Changing paint size:

where it says:
backg.fillOval(x-10,y-10,20,20);

you can change the numbers to make the paint brush size bigger or smaller.
i would highly recomend:
first two the same
last two the same
last two double the first two
as this will make sure the brush is always circle and the cursor is at the center of the brush.

so for example you could change it to:
backg.fillOval(x-20,y-20,40,40);
for a double size brush!

note: the first two determine where the cursor is in comparison to the brush and the last two determine the size of the brush!

And your simple paint program is done!

P.S. I wrote this tutorial about 6 months ago, when i wasn't that good with Java, so sorry for the crappy explanations ;)