java - JOptionPane displaying some HTML tags literally -


i'm getting inconsistent html display in swing message dialog. first example call below fine, second 1 displays 1 of break tags literal text. what's going on here?

import javax.swing.*;  class test {     public static void main(string... args) {         swingutilities.invokelater(() -> {             joptionpane.showmessagedialog(null,                 "<html>line 1<br>line 2<br>line 3");             joptionpane.showmessagedialog(null,                 "<html>line 1<br>\nline 2<br>\nline 3");         });     } } 

don't know problem looks jlabel renders html correctly:

jlabel label = new jlabel("<html>line 1<br>\nline 2<br>\nline 3"); joptionpane.showmessagedialog(null, label); 

which doesn't make sense because thought joptionpane jlabel render text?


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -