jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Mixing Swing & HTML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Mixing Swing & HTML" Watch "Mixing Swing & HTML" New topic

Mixing Swing & HTML

Stefan Elfvinge
Ranch Hand

Joined: Oct 29, 2001
Posts: 52
Is it a poor idea to have, for example, a JOptionPane in the Servletcode. Could it be done?
The problem is that it seems to take forever to execute the servlet(displaying a html-form), and the JOptionPane never "pops" up!!!???

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17011

Not clear what you're asking, but if you expect to embed Swing controls in a servlet, that won't work - servlets have no GUI. Swing (and AWT) are for Applications and Applets.

Customer surveys are for companies who didn't pay proper attention to begin with.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
Tim is right -- the only way to do the thing that I think you're asking is to embed an applet tag(whose applet code contains the JOptionPane) in your HTML.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Mixing Swing & HTML
It's not a secret anymore!