Java: How do i align the text in the center?

Printable View