views:

61

answers:

2

How to call javascript alert from java class

A: 

Perhaps you are looking for a message box similar to the Javascript alert() box? Then use

javax.swing.JOptionPane.showMessageDialog(null, "hello");
Bevin
+1  A: 

I can't know for sure, but if you want to make a Java Applet and Javascript interact, try these:

Java-to-Javascript Communication

Java - Javascript interaction

mdrg