File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Reg: Running Swing in Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Reg: Running Swing in Browser" Watch "Reg: Running Swing in Browser" New topic
Author

Reg: Running Swing in Browser

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
hi,
i have a swing application. I wanted to run it in a browser i have firefox. i have the following import statements in my java code. I have only used the swing components in the application.


and the code of html file generated by the html converter is.



i have also installed j2see sdk ver 1.4. but my browser still shows an dialogue displaying unknownplugin (application/x-java-applet;jpi-version=1.3.0_01).

please any body help me regarding this issue

Thanks and Regards in Advance
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

Moving to a more appropriate forum.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41106
    
  45
I recommend using an APPLET tag, not EMBED or OBJECT. Those introduce a number of complications without offering commensurate benefits.


Ping & DNS - my free Android networking tools app
adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
ok when i used the applet tag in this way


i am able to see just a plain box and a cross mark at the top
when i checked the java console i can see this

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41106
    
  45
What is "ButtonDemo"? Does it extend Applet or JApplet? In the code you posted earlier the applet class was named "login".
adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
Actually the login is the slightly complex application. So i was experimenting on the simple ButtonDemo class. But this ButtonDemo already extends JPanel.
Here's the code
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41106
    
  45
In that case you could write a little wrapper class that extends JApplet, and to the content pane of which you'd add the ButtonDemo object.
 
jQuery in Action, 2nd edition
 
subject: Reg: Running Swing in Browser
 
Similar Threads
applet not showing
Problems when initiating applet for jre1.4.2 when jre1.5 is on the client
Using cab files
Unable to load Applet in Tomcat 5.5.12
Unable to load Applet in Tomcat 5.5.12