Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

how to send the attributes of JTextPane over the network

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a chatting module in which the members of the chat can type text in different color ,font and size and i want to send this to other members of the chat room as well. that means that i have to send the attributes of each and every character of the jtextpane in which the members type their message and send it across the n/w but when i try to send it it says that the attirbuteset object is not serializable. how should i send the data.last but not least the data that i want to send is to be appended to another JTextpane. so that is way i want to send the attributeset along with the data typed,across the network. i hope this clears the scenario.plz help.it is urgent.thx in advance.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd see if I couldn't set content type to HTML or RTF or something that streams out to Strings nicely. What is your content type now? What does getText() give you now?
 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i had tried using HTML document once but then whatever i type is shown along with the html tags. so that is not what i want. i just want the text to be displayed with the effects that the user gives.i haven't specified any document for the JTextPane.it is the default one.if there is a small code that supports your statement then that would be good for me.thx.what are the other formats that can be specified apart from html and how do you do that. for ex: if you want to set the html format then you can say setContentType("text/html"),so what are the other formats and how do you specify them.i hope i am on the right track.
[ September 14, 2005: Message edited by: mihir maniar ]
reply
    Bookmark Topic Watch Topic
  • New Topic