java swing dialog box

Java
JOptionPane.showMessageDialog(null, "java is fun");
Source

Also in Java: