Changing Font in a JTextArea

Posted on 2005-04-25
Medium Priority
Last Modified: 2013-12-03
I would like to make a window that pops up and lets users choose a font to use in a JTextArea that I have. Does anyone know how I would go about doing this?
Question by:jasoncuevas
  • 3
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 13863194
After importing the correct classes, all you need to do is:

FontChooser chooser = new FontChooser(frame);
// Get the user's selection
Font font = chooser.getSelectedFont();
LVL 92

Expert Comment

ID: 13863209
Calling setFont() should be all you need
LVL 86

Expert Comment

ID: 13865859

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question