File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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!!!???


Steffe
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

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
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
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


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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Mixing Swing & HTML
 
Similar Threads
Align Text in JOptionPane
java alert
[B]How To Center/Position a showMessageDialog box?[/B]
Calling JOptionPane in A servlet Class
actions performed