The API is your best friend: Graphics (Java Platform SE 6)

I suggest you read through that, then write a small program that you can play with to see what happens when you change each value.