Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do i underline a text in JEditorPane

843806Aug 19 2009 — edited Aug 20 2009
Hello All,

I have one class extends JEditorPane Whose constructor contains code as bellow :
super("text/plain","Hello");
setEditable(false);
Font ft=new Font("Bold Arial",Font.ITALIC,new JEditorPane().getFont().getSize());
setFont(ft);
setForeground(Color.BLUE);
I just want to have an underline to the text. But without using HTML tags..

can it be possible with Font Class ??? If yes , How???


Thanks in advance
Suyog
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2009
Added on Aug 19 2009
3 comments
979 views