I tried this: [Code Zip](http://ndt.yw.lt/files/1063044/ErrorDialog.zip)

Sorry for the inconvenience but I could not attach the whole code (though it's not too big) and could not provide .java extension link so you have to get the zip and it open in html where code is with syntax highlighting.

I read these:

* [Java GUI - JOptionPane/JDialog customization issue](https://stackoverflow.com/questions/29785580/java-gui-joptionpane-jdialog-customization-issue)
* [How to make font bold in java dialogue box?](https://stackoverflow.com/questions/4769076/how-to-make-font-bold-in-java-dialogue-box)

But I don't want to use HTML.

Code
----

```
public static void main(String argv[]) {
    JFrame jf;
    jf = new JFrame();
    JPanel jp = new JPanel();
    jf.setBounds(100, 100, 530, 350);
    jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    jf.getContentPane().setLayout(null);
    jp.setFont(new Font("Algerian", Font.ITALIC, 11));
    jf.add(jp);
    String message = "Hello World!”;
    JOptionPane jop;
    jop = new JOptionPane();
    Object[] obj = { UIManager.put("Panel.font",new Font("Algerian", Font.ITALIC, 11)) , message };
    JOptionPane.showMessageDialog(jp,obj,"Dialog",JOptionPane.NO_OPTION);
  }

```