I am scraping data from web site using my java application and want to display the result after parsing code of html page in a Text Area made in Swing.
Text like: hello <b>every</b>one
should be displayed as: 'hello everyone' in text area.
Thanks!!
JEditorPane ep = new JEditorPane();
ep.setContentType("text/html");
ep.setText("html code");
You can use a JEditorPane to display HTML or a JTextPane, which allows you to set attributes for specific characters. Read the API and you will find a link to the Swing tutorial which provides examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With