Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 17th, 2005, 07:41 AM
Registered User
Join Date: Jul 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Bold fonts in JTextPane

I want to create JTextPane where can I change font style which are selected. For instance I create a button but I dont know what should I put in the event click in button to change the font style in JTextPane.

Tnx in advance

Old August 1st, 2005, 06:22 PM
Authorized User
Join Date: Aug 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts

Just say m_textPane.setFont(yourFont);

Where m_textPane is the JTextPane, and yourFont is the Font instance you have selected.

For more info on Fonts, checkout this example,


Similar Threads
Thread Thread Starter Forum Replies Last Post
make option button = bold ff12 Excel VBA 1 March 25th, 2007 11:07 PM
Pivot Subtotals in Bold paul20091968 Excel VBA 0 June 29th, 2006 07:03 AM
making a link bold knalle HTML Code Clinic 5 November 12th, 2004 11:46 AM
Bold Words in Strings SerranoG Access VBA 6 September 24th, 2004 06:46 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.