This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Is it possible to Integrate Swing with Struts2? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Is it possible to Integrate Swing with Struts2?" Watch "Is it possible to Integrate Swing with Struts2?" New topic
Author

Is it possible to Integrate Swing with Struts2?

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

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.


Learning and Learning!-- Java all the way!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8877
    
    8

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

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

Joined: Oct 29, 2001
Posts: 8877
    
    8

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

Joined: Jan 05, 2011
Posts: 477

Thanks for the reply Joe!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to Integrate Swing with Struts2?