I just can't seem to figure this crap out. I already had to convert all my code into a JTextPane just so I could change the style of text, and now I can't get it to work.
Here is the junk I have so far:
Code:public void processBoldText() { MutableAttributeSet keyWord = new SimpleAttributeSet(); StyleConstants.setBold(keyWord, false); int left = textArea2.getSelectionStart(); int right = textArea2.getSelectionEnd(); int length = right - left; doc.setCharacterAttributes(left,length,keyWord, true); }




Reply With Quote