The problem is likely that you don't have antialiasing turned on your Graphics context. Try the following line before you draw:
graphics.setRenderingHint(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
(where, of course, graphics
is your Graphics2D instance).
Later on when you discover that the text you're drawing is also ugly and jagged, you'll want to use
graphics.setRenderingHint(
RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
However, text is a little more complicated; there's several values for this hint that you can use depending on (among other things) the type of screen you're drawing the text to. You should read the RenderingHints.KEY_TEXT_ANTIALIASING
API doc for those details.