title: Java: Fonts and Pixels
body: <p>I'm making a game and in the menu I want to display the text in the center of the screen.
  Is there a way in Java to get/calculate the width of a piece of text in a specified font with specified size and style.</p>
  
  <p>Martijn</p>