Because its hard to gather from your post what stage you really are at, I'll point you in the direction of the java tutorials which may answer your question and then some.
Lesson: Printing (The...