I am working on Java 7. I am trying to format text by using HTML tags. I pass in text into
JTextField text = new JTextField();
text.setText("<html><body><p>The program performs encryption operations on the following ciphers: </p></body></html>");
But the program prints the HTML tags too. That sample of text is only an example.
What might be the problem?
Cheers
JTextFielddoes not support HTML. You could useJTextPaneinstead: