Home > Articles

This chapter is from the book

Q&A

  • Q Is there a way to change the font of text that appears on a button and other components?

  • A The JComponent class includes a setFont(Font) method that can be used to set the font for text displayed by that component. You will work with Font objects, color, and more graphics in Lesson 13, “Creating Java2D Graphics.”

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.