I have this:
JOptionPane.showMessageDialog(null, \" \" + company1 +
\" Has Higher A Market Value\\nThan \" + company2,
\"Informa
Use HTML
JOptionPane.showMessageDialog(null, "<html> <b> Has </b>Higher A Market Value</html> ");
If your default font doesn't support it then you can specify it like
String msg = "<html>This is how to get:<ul><li><i>italics</i> and "
+ "<li><b>bold</b> and "
+ "<li><u>underlined</u>...</ul></html>";
JLabel label = new JLabel(msg);
label.setFont(new Font("serif", Font.PLAIN, 14));
JOptionPane.showConfirmDialog(null, label);
Output: