JavaScript Exe as Applet

Applet failed to run. No Java plug-in was found.

You need Java Runtime Environment to run JavaScript Exe in the browser.

Code

importPackage(javax.swing);

if (js.is_applet()) {
    function hello() {
        JOptionPane.showMessageDialog(null, "<html><font size='3' color='red'>Welcome to JavaScript Executable!</font></html>", "Alert", JOptionPane.WARNING_MESSAGE);
    }
    var button = new JButton("Click me");
    var o = {
        mouseClicked: function(e) {
            hello();
        },
        mouseEntered: function(e) {
        },
        mouseExited: function(e) {
        },
        mousePressed: function(e) {
        },
        mouseReleased: function(e) {
        }
    };
    var adapter = new JavaAdapter(java.awt.event.MouseListener, o);
    button.addMouseListener(adapter);
    js.applet().add(button);
}