Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Javascript from a Java Class

Status
Not open for further replies.

ob1kanobee

Programmer
Dec 27, 2002
47
US
Is it possible to call a javascript function, like the alert function, within a java class function?

I know I can create my own messagebox class using JOptionPane, but I would like the same look and feel of the standard Windows message box that the alert function provides.
 
Are you using the 'Windows' pluggable look-and-feel? The message boxes produced by JOptionPane using this are pretty much as the regular Windoze ones.

Tim
 
Thanks for the responses. I think I'll stick with the JOptionPane. I'll need to look into that, thanks timw.
 
If it's any help, you can set the windoze look and feel like this:-

Code:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");

The UIManager is in javax.swing

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top