powered by Jive Software

Font Caracteristics

HI! How can a show in the Client 2 the FONT caracteristics in the Client 1 in a conversation??? example, if the text are in BOLD or ITALIC and the style???

I found this in the SMACK´s documentation:

Message message = chat.createMessage();

// Add a Color object as a property.

message.setProperty(“favoriteColor”, new Color(0, 0, 255));

// Add an int as a property.

message.setProperty(“favoriteNumber”, 4);


Getting those same properties would use the following code:

Message message = chat.nextMessage();

// Get a Color object property.

Color favoriteColor = (Color)message.getProperty(“favoriteColor”);

// Get an int property. Note that properties are always returned as

// Objects, so we must cast the value to an Integer, then convert

// it to an int.

int favoriteNumber = ((Integer)message.getProperty(“favoriteNumber”)).intValue();

I´ll try this maybe works…


Hi Andres,

Spark 1.0.x did use and[/b] just like in this forum to format some text. It’‘s no longer used, but one could add HTML tags like < b > < font … > into the message text (as it was discussed here some weeks ago) to get the desired results. If you are writing and deploying your client in a LAN you’‘ll see no problems but users of other IM clients may display the tags as text without formatting. Messaging some HTML pages as plain text get’'s impossible using this approach.


Style information can be transfered over XMPP via XHTML you can find out more information about it in the Smack extensions manual:

http://www.jivesoftware.org/builds/smack/docs/latest/documentation/extensions/in dex.html

If you need any more help, let me know.


once again a broken link, fixed