hi all
i am working on a ui component in which i have a problem i am facing is that i have to show html code in the text area or document or editor pane
, if i use the same html code and set the label of the button then i get the right result but in the case of text i dont get the result. i am sending the code for those two cases
1> here button is a JButton and a Model is associated with it name SpclCharModel ; getHtml_code() fun give the html code crossponding to that character ;; and it works fine
Font font=new Font("Courier New",Font.PLAIN,20);
button.setFont(font);
button.setText("<HTML>" + spclCharModel.getHtml_code()+ "</HTML>");
2> here preview is an EditorPane or it may be a Document it simply print
</HTML>htmlcode<\HTML>
and e is action event which generates when the button is pushed
Font font=new Font("Courier New",Font.PLAIN,15);
previewTxt.setFont(font);
previewTxt.setText("<HTML>" + e.getSpclCharModel().getHtml_code()+ "</HTML>");