Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2005, 07:41 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
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


Reply With Quote
  #2 (permalink)  
Old August 1st, 2005, 06:22 PM
Authorized User
 
Join Date: Aug 2005
Location: Chelmsford, MA, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HI,
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,
http://www.javareference.com/jrexamp...mple.jsp?id=82

Rahul
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:47 PM.


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