• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 376
  • Last Modified:

Swing used in WebBrowser

How can i use GUI in web browser. Is there any possibilities for swing to run on browser for graphical use.

 Not in applet,its swing, give me some idea and sample coding.



 
0
aeltech
Asked:
aeltech
  • 2
  • 2
3 Solutions
 
suprapto45Commented:
Hi,

As far as I know, without applet, unfortunately you can't do that. YOu need to have applet to display SWING on webbrowser. Otherwise, you need to use JSP or HTML to display it.

David
0
 
TimYatesCommented:
>> Not in applet,its swing

You can use Swing in a JApplet, but suprapto45 is right, you need an applet of some sort...

Tim
0
 
liviutudorCommented:
there is a way of doing it without using applets -- but i wouldn't recommend it:
you can use a java servlet engine and start the swing components (say a JFrame) on the server side and use an image encoder to take a snapshot of the components and then push that as an image to the user. The using some server-side image maps you process user input when s/he clicks on the image, detect coordinates, find out what control s/he has clicked on and invoke the actionlistener on the server side for that control. Like I said, it can be done, but I would argue that one would be well.... mad for no better word :) to try to do it this way.
0
 
TimYatesCommented:
Ooooh...  Good call...I remmeber there was a framework that did that for you, but it never really worked right...

*tries to remember its name*

Webcream I think:

http://www.creamtec.com/webcream/

Tim
0
 
liviutudorCommented:
Well, like I said Tim, I would have never thought of a need to actually do this. Besides, Swing is "heavy" and to have a server with say 1000 connections, each one starting up 3-4 JFrames with JPanels and the whole lot inside would be a killer for any Rolls-Royce server I reckon. Still, it is a way of doing things.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now