We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Swing used in WebBrowser

aeltech
aeltech asked
on
Medium Priority
401 Views
Last Modified: 2013-11-23
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.



 
Comment
Watch Question

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
CERTIFIED EXPERT
Top Expert 2004
Commented:
>> Not in applet,its swing

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

Tim
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.
CERTIFIED EXPERT
Top Expert 2004

Commented:
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
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.