CodeProject.TV will close July 31. Remember to ensure you’ve watched or download your videos! Full details here.

Changing the Font: Mastering Java Swing Part 67

4m 58s
Download
Caveofprogramming

Cave of Programming

After working as a software developer and contractor for over 14 years for a whole bunch of companies including CSC, Proquest, SPSS and AT&T in the UK and... Read more

How to set the font in your Swing apps.

Swing components that display text have a setFont() method which you can use to change the font. We'll look at how to change the font in this tutorial using "logical fonts"; fonts where you specify the general type of font you want, and Swing chooses the actual particular font for you.

Setting the font
Using logical fonts
Sans-serif, serif and monospaced font types