Replacing substrings with images in GUI (parser)

K

Karsten Wutzke

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
 
K

Knute Johnson

Karsten said:
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.
 
J

Jeff Higgins

Karsten said:
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
 
J

Jeff Higgins

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top