Instead, use a layout manager and a logical font family. This example with the Font
below adds 24-point italic serif text to the center of a (default) BorderLayout
to achieve a pleasing result on disparate platforms.
ta.setFont(new Font("Serif", Font.ITALIC, 24));
Mac OS X:
Windows 7:
Ubuntu Linux: