How to Change Font Size in drawString Java

The Solution to How to Change Font Size in drawString Java is


g.setFont(new Font("TimesRoman", Font.PLAIN, fontSize)); 

Where fontSize is a int. The API for drawString states that the x and y parameters are coordinates, and have nothing to do with the size of the text.

~ Answered on 2013-08-15 09:27:58


Most Viewed Questions: