aspose file tools
The moose likes Servlets and the fly likes Servlet & Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet & Swing" Watch "Servlet & Swing" New topic

Servlet & Swing

Tod Sterben

Joined: May 05, 2003
Posts: 7
I have a Swing app that I need to convert into a servlet (I think & I hope). I don't want to have to convert all of this to HTML.
It has Scroll panes, JPanel, JComboBoxes & JLists.
Also SQL.
Is it possible to have this work?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16892

Swing requires asynchronous communications between the UI components. Servlets are only permitted what HTTP permits, which is synchronous request-response type communications initiated from the client side only.
That's why it's not accurate to refer to server-based UI paradigms as "MVC". And why the Model 2 scheme had to be developed to work around those limitations.
OTOH, if you can convert your app into an applet, the server can send it embedded in a web page to the client computer and the two systems can converse. Subject to all the usual grief that applets subject you to.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Servlet & Swing
jQuery in Action, 3rd edition