Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Is it possible to Integrate Swing with Struts2?

 
Ranch Hand
Posts: 477
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm a newbie to web technologies , and am currently in the development of Struts 2 application , however I would like to use Swing to implement the view layer in my web -app . I did do some reading and came to understand that its not seamlessly possible , however i did come across this link which suggests a possibility of integration , it would be great if anyone could help me in this regard
The link that indicates the possibility of a struts - swing integration is -
http://javaboutique.internet.com/tutorials/Swing/

I'm planning to use the swing support to improve the GUI and put in features like tabbed panes et al.

It would be great if anyone could suggest an alternative to using swing support (im not interested in applets due to the long upload / download times , which would render my web-app useless)

Any advice would be appreciated
Thanks in advance.
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's possible, but I don't think it is a good idea. First, you will either need an applet or application to host the Swing components which you say you don't want.
You would be better off using the Jquery Pluginor GWT Plugin to get more complex front-end functionality.
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Joe Ess wrote:It's possible, but I don't think it is a good idea. First, you will either need an applet or application to host the Swing components which you say you don't want.
You would be better off using the Jquery Pluginor GWT Plugin to get more complex front-end functionality.



Thanks for the reply Joe!
I have
Would Jquery/GWT plug in provide the same functionality as would swing classes?(read:front end complex functionality).


2. Would hosting the Swing components using an applet have any drastic disadvantages? As when using a standard view layer .


Also ,
Would this integration be possible (i mean with swing) be possible if i used the spring mvc 3 framework ? As we haven't finalized our final framework yet.

Thanks in advance,
 
Joe Ess
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vic Hood wrote:
Would Jquery/GWT plug in provide the same functionality as would swing classes?(read:front end complex functionality).



Your best bet is to look at the feature sets offered by those libraries. To me, they have been more than enough, but I'm not trying to duplicate Swing.

Vic Hood wrote:
2. Would hosting the Swing components using an applet have any drastic disadvantages? As when using a standard view layer .



You've already mentioned one of the big disadvantages: download time. Another is that Struts is designed to be a Front Controller for web pages (e.g. click this button, load this page). Swing works at a more granular level (click this button, send a message).


Vic Hood wrote:
Also ,
Would this integration be possible (i mean with swing) be possible if i used the spring mvc 3 framework ? As we haven't finalized our final framework yet.



I haven't worked with Spring. As long as you are attempting to use desktop technology (swing) with web technologies (spring mvc, struts) there will be significant friction.
 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Joe!
 
You have to be odd to be #1 - Seuss. An odd little ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic