Replacing substrings with images in GUI (parser)

Discussion in 'Java' started by Karsten Wutzke, Mar 19, 2008.

  1. Hello,

    I want to write a smiley parser which does no more than find smaller
    substrings in another and replaces those with some image displayed in
    some text component.

    Which class/es can you recommend?

    Do you perform the image replacement on Document level or on the text
    component level?

    Suggestions welcome!

    Karsten
     
    Karsten Wutzke, Mar 19, 2008
    #1
    1. Advertising

  2. Karsten Wutzke wrote:
    > Hello,
    >
    > I want to write a smiley parser which does no more than find smaller
    > substrings in another and replaces those with some image displayed in
    > some text component.
    >
    > Which class/es can you recommend?
    >
    > Do you perform the image replacement on Document level or on the text
    > component level?
    >
    > Suggestions welcome!
    >
    > Karsten


    There are a couple of ways you could go about this. Create a font that
    has those characters in it or create a component that will display text
    and graphics. The JTextPane might work for what you want to do. I
    haven't played with that very much.

    --

    Knute Johnson
    email s/nospam/linux/

    --
    Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    ------->>>>>>http://www.NewsDem
     
    Knute Johnson, Mar 19, 2008
    #2
    1. Advertising

  3. Karsten Wutzke

    Jeff Higgins Guest

    Karsten Wutzke wrote:
    > Hello,
    >
    > I want to write a smiley parser which does no more than find smaller
    > substrings in another and replaces those with some image displayed in
    > some text component.
    >
    > Which class/es can you recommend?
    >
    > Do you perform the image replacement on Document level or on the text
    > component level?
    >
    > Suggestions welcome!
    >


    Hi,
    I'm interested in reading more replies to your question as I'll soon
    be working on a similar problem. Right now I'm looking at:
    javax.swing.text.html.HTMLEditorKit.ParserCallback.
    <http://java.sun.com/javase/6/docs/api/javax/swing/text/html/HTMLEditorKit.ParserCallback.html>

    JH
     
    Jeff Higgins, Mar 20, 2008
    #3
  4. Karsten Wutzke

    Jeff Higgins Guest

    Jeff Higgins wrote:
    >
    > Karsten Wutzke wrote:
    >> Hello,
    >>
    >> I want to write a smiley parser which does no more than find smaller
    >> substrings in another and replaces those with some image displayed in
    >> some text component.
    >>
    >> Which class/es can you recommend?
    >>
    >> Do you perform the image replacement on Document level or on the text
    >> component level?
    >>
    >> Suggestions welcome!
    >>

    >
    > Hi,
    > I'm interested in reading more replies to your question as I'll soon
    > be working on a similar problem. Right now I'm looking at:
    > javax.swing.text.html.HTMLEditorKit.ParserCallback.
    > <http://java.sun.com/javase/6/docs/api/javax/swing/text/html/HTMLEditorKit.ParserCallback.html>
    >


    Ah! Just found this also:
    javax.swing.text.html.HTMLDocument.HTMLReader
    <http://java.sun.com/javase/6/docs/api/javax/swing/text/html/HTMLDocument.HTMLReader.html>

    JH
     
    Jeff Higgins, Mar 20, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Will McGugan

    Replacing large number of substrings

    Will McGugan, Sep 4, 2005, in forum: Python
    Replies:
    3
    Views:
    327
    Michael J. Fromberger
    Sep 4, 2005
  2. amadain
    Replies:
    11
    Views:
    438
    Paul McGuire
    Feb 14, 2007
  3. Tung Chau
    Replies:
    1
    Views:
    470
    SM Ryan
    Aug 6, 2004
  4. Tung Chau
    Replies:
    0
    Views:
    376
    Tung Chau
    Aug 6, 2004
  5. DarthBob88

    Finding and Replacing Substrings In A String

    DarthBob88, Sep 23, 2007, in forum: C Programming
    Replies:
    7
    Views:
    566
    Keith Thompson
    Sep 23, 2007
Loading...

Share This Page