Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set multiple fonts inJTextArea or JTextPane  RSS feed

 
srini taek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi javalovers,
This is the first time am writin to javaranch.
My question is it possible to obtain multiple fonts in JTextArea or JTextPane .I have tried in JTextArea to find
that it supports only one font.Am currently working on a wordprocessing applet can anyone suggest me which component
would be suitable to get input text and also have multiple fonts.Something like i select one word from my sentence and
want that to be bold .So which swing component supports multiple fonts.
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srini,
This might be overkill but take a look at the application below.

Enjoy,
Manfred.
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manfred ,
If there is an alignment menu and a image is placed in the textpane, does alignment work for image too..
(i.e if the user selects a line which has image and does right alignment whether the image too move along with it or only the text?)
thanks,
Regards,
silva.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!