Results 1 to 1 of 1
- 02-19-2009, 02:56 PM #1Member
- Join Date
- Feb 2009
- Rep Power
getStyle name in JtextPane at caretPosition
I'm developing word processor, i succeeded to set the Style to the selected text in JTextPane. But i'm not able to get the set Style to the text when the caret is positioned before element or char or when we select the Text.
This string was set BOLD and this string ITALIC. now if i move caret position to before or after B it should say char set Bold, same way if i move caret position before or after I (Italic), it should say char set to Italic
code snippet would help me lot.
Many thanks in advance.
- By Gudradain in forum AWT / SwingReplies: 11Last Post: 01-04-2009, 11:08 PM
- By nadia in forum AWT / SwingReplies: 2Last Post: 12-28-2008, 02:41 AM
- By kinabaloo in forum Advanced JavaReplies: 2Last Post: 07-11-2008, 06:32 AM
- By Java Tip in forum javax.swingReplies: 0Last Post: 06-27-2008, 07:48 PM
- By Ada in forum AWT / SwingReplies: 1Last Post: 05-31-2007, 09:50 PM