Results 1 to 13 of 13
Thread: Opening applet with .html file
- 09-12-2009, 01:23 AM #1
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
- 09-12-2009, 04:22 AM #2
Senior Member
- Join Date
- Dec 2008
- Location
- Hong Kong
- Posts
- 473
- Rep Power
- 11
read it, the use of applet tag if your java applet is correct
Deploying Applets (The Java™ Tutorials > Deployment > Applets)
remember, you need to set the width, height attributes in the applet tag
- 09-12-2009, 10:42 AM #3
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
how do i run it? i used textedit and saved the file as a html but when i open it safari just shows me the code as text on the browser? i want to be able to click on a html file and open the applet.
- 09-12-2009, 11:10 AM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 13
You didn't read the link suggested above, did you?
- 09-12-2009, 01:53 PM #5
Member
- Join Date
- Jul 2009
- Location
- bhubaneswar
- Posts
- 5
- Rep Power
- 0
let's assume the class file name of ur applet code is SimpleApplet.
here is the html file that execute that applet
Java Code:<applet code="SimpleApplet" width=200 height=100> </apple>
- 09-12-2009, 09:46 PM #6
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 13
</apple> ?
-
- 09-13-2009, 01:22 AM #8
haha, I was wondering what r\d+x was talking about. Now I see it.
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 09-13-2009, 02:22 AM #9
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
blegh i understand all the code n stuff i just dont know how to run it. nothing tells me where i type that code
- 09-13-2009, 05:09 AM #10
Did you typed the code correctly, have java installed and enabled on safari? Did you follow the link and read the instructions?
attached in a class file and an html file that works on IE.USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 09-13-2009, 06:47 AM #11
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
yeah works perfectly, as long with other applets, but whenever i open mine it just shows the text i typed in the file
- 09-13-2009, 06:49 AM #12
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
k and i just noticed when i open yours as a text file it displays the text thats in your applet the "you Should see an applet below"
edit
k i looked at the Textedit prefences and theres a bunch of different option for saving in html.
it gives 4 different document types, 4.01 HTML strict, 4.01 HTML transitional, XHTML 1.0 strict and XTHML 4.01 strict.
it gives 3 different styling: embedded cSS, inline CSS and no CSS
then it gives encoding, which just seems like differnent languages and such any ideas?
Edit Edit
HA i got it to work, i had to turn it off rich text format, sheesh
applet doesnt run but i got the little X symbol which excited me,
ill prolly get it running in the next 10 min
thanks for your help guys :)Last edited by Atriamax; 09-13-2009 at 07:04 AM.
- 09-13-2009, 07:26 AM #13
Member
- Join Date
- Sep 2009
- Posts
- 41
- Rep Power
- 0
got the applet working, but its not loading my sounds and images, they are in the same directory and the been using getCodeBase() but it doesnt load them.
(its been working in eclipse, just not once it goes on the browser)
any suggestions?
it wasnt working, so i looked at that link again and got
java.sun. com/docs/books/tutorial/deployment/applet/data .html
(which was exactly what i was doing before i looked it up)
Similar Threads
-
Opening a custom proyect file
By janpol1 in forum EclipseReplies: 0Last Post: 02-04-2009, 03:29 PM -
Opening file, runs in NetBeans but CommandPrompt
By fauzilhaqqi in forum NetBeansReplies: 2Last Post: 12-15-2008, 04:48 AM -
How can I include a html file in html textarea?
By surya_dks in forum New To JavaReplies: 2Last Post: 10-04-2008, 08:20 AM -
Java Applet HTML
By ownlol in forum Java AppletsReplies: 4Last Post: 07-21-2008, 03:59 AM -
Problem in opening a file
By Raghav kv in forum New To JavaReplies: 1Last Post: 08-11-2007, 02:55 PM
Bookmarks