wood burning stoves 2.0*
The moose likes Applets and the fly likes How to use swings with applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "How to use swings with applet" Watch "How to use swings with applet" New topic
Author

How to use swings with applet

Neeraj Kumar Mishra
Greenhorn

Joined: May 22, 2002
Posts: 9
I am having an application in Swings....i want to launch it from the web-browser itself...using an applet...can anybody tell me how to proceed...
If i use applet the application gets started but the functionalities are lost...
Vijayakumar Arya
Ranch Hand

Joined: Jan 27, 2003
Posts: 76
Hi,
The functionalities are missing ??? what are those functionalities. There is a huge difference between a Swing application launched on desktop and launched through applet. It is the security issue that I am addressing, you have to provide the applet with sufficient privilleges to perform your task. To acheive this you have to sign the applet.
Also, I assume here that you have converted the html file to launch the applet to invoke the JRE from the browser, a smart tag will tell the browser to load the JRE in the browser and pass the applet tag as an input to the JRE, then JRE loads the applet.
Open the java console and find the exception that is getting thrown when you try to invoke a particular functioanlity.
Hope this helps.


Thanks,<p>Vijay<p>The Hand that gives, Gathers.
Guru Gulab Khatri
Greenhorn

Joined: Feb 06, 2003
Posts: 5
You will have to convert the html file containing the applet tag with the htmlconverter utility which comes with Java2 1.4 edition. This is the utility.
Reason:
According to my info the <applet> tag is not supported by the internet explorer, the new tag supported is <OBJECT> tag. you can use the htmlconverter utility to convert the <applet> tag to <object>.
Try this
If if doesn't works send me a message.
Ashish
Vijayakumar Arya
Ranch Hand

Joined: Jan 27, 2003
Posts: 76
Originally posted by Guru Gulab Khatri:
You will have to convert the html file containing the applet tag with the htmlconverter utility which comes with Java2 1.4 edition. This is the utility.
Reason:
According to my info the <applet> tag is not supported by the internet explorer, the new tag supported is <OBJECT> tag. you can use the htmlconverter utility to convert the <applet> tag to <object>.
Try this
If if doesn't works send me a message.
Ashish

For your kind information the <applet> tag is supported by the Internet Explorer, the big difference is that the base class of the applet, if you are extending a java.applet.Applet, then the default VM, the MS VM (not the JRE) will undestand and load the applet. Since swings use javax.swing.JApplet which is not recognized by the Microsoft VM you need the JRE plugin and the HTML Converter.
This is the reason why Sun is fighting against Microsoft to include the Java Plugin in all the OS that are shipped from Microsoft. You can visit the Java News Forum for an ongoing discussion on this.
Neeraj has said that the application is getting started and some functionalities are missing... So I assumed that he had completed the prerequisites for loading the Swing application as an Applet.
Vijayakumar Arya
Ranch Hand

Joined: Jan 27, 2003
Posts: 76
Hi Neeraj,
I have seen your private message, I feel you post your message so that many people can address. Also I don't prefer private messages.
If you want faster response post it in the forum, I am keeping track of the forums I am answering.
Please help me to help you....
Also our number of posts gets incremented everytime we post here . This would not be the case otherwise.
The main intension is that my answers are watched by many eyes, a security check whether I am right
As far as Filechooser, you just check with the Java site. Please post the exception here so that we can trace out where could be the problem.
I have not tried using File chooser in applets.
[ February 21, 2003: Message edited by: Vijayakumar Arya ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use swings with applet
 
Similar Threads
chat application like facebook
Is there any way to call servlet?
Need to limit the text
Image trasfer using AWT/Swing
regarding web services and swings