setFont()



Constructor for class Font:
(http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Font.html)

Font(String name, int style, int size)

what about color? how to set Font Color?

I'm working w/JTextArea, now realized need to use JTextPane b/c will need diff. font colors depending on user input.. (nothing fancy, no images, no HTML (at least I don't think I need to do w/html..) all font attr's will remain constant, only font color will change.. (also would like if user inputs url for it to be a link..)

I have just spent entire evening looking this up... is not that simple....;) I'm going a bit dizzy... ;)

thank you for any help...






.



Relevant Pages

  • Re: Mixing font colors in a JTextArea
    ... > but how can I have different font colors in the same area? ... Use HTML in a JEditorPane. ... look to a JTextPane and manipulate the document attributes. ...
    (comp.lang.java.gui)
  • Re: Creating html email on a Mac classic OS
    ... You mean Outlook Express, not Outlook, right? ... Are you talking about simple HTML or complex HTML? ... Simple HTML (different fonts, bold, italics, font colors, etc.) can be done ...
    (microsoft.public.internet.outlookexpress.mac)