Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Replacing substrings with images in GUI (parser)

Thread view: 
Karsten Wutzke - 19 Mar 2008 20:48 GMT
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
Knute Johnson - 19 Mar 2008 23:14 GMT
> Hello,
>
[quoted text clipped - 10 lines]
>
> 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.

Signature

Knute Johnson
email s/nospam/linux/

     ------->>>>>>http://www.NewsDem

Jeff Higgins - 20 Mar 2008 01:45 GMT
> Hello,
>
[quoted text clipped - 8 lines]
>
> 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.Parser
Callback.html
>

JH
Jeff Higgins - 20 Mar 2008 01:49 GMT
>> Hello,
>>
[quoted text clipped - 14 lines]
> javax.swing.text.html.HTMLEditorKit.ParserCallback.
> <http://java.sun.com/javase/6/docs/api/javax/swing/text/html/HTMLEditorKit.Parser
Callback.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.HTMLRea
der.html
>

JH


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.