KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to create some special component for a specific purpose, on that component I need to draw a HTML string, here's a sample code: public class MyComponent extends JComponent{ public MyComponent(){ super(); } protected void paintComponent(Graphics g){ //some drawing operations... g.drawString("<html><u>text to render</u></html>",10,10); } } Unfortunately the drawString method seems to be not recognizing the HTML format, it foolishly draws the string just as it is. Is there any way to make that work?
Tags (comma-separated)
Save Edits
Cancel