File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Quick (X)HTML Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Quick (X)HTML Q" Watch "Quick (X)HTML Q" New topic

Quick (X)HTML Q

Jon Brasted

Joined: Mar 18, 2004
Posts: 19
I just read on that <applet> tag for applets was deprecated in HTML 4.01. and the applet element is not supported in XHTML 1.0 Strict DTD.
How do I go about putting a Java applet into a webpage if the <applet> tag is deprecated/not supported?
Many thanks,
Jon Brasted

Joined: Mar 18, 2004
Posts: 19
"However, since the few browsers that support OBJECT do so with significant bugs, APPLET is currently a more reliable method of embedding Java applets." -
Hmmm... what do most people use?
Jon Brasted

Joined: Mar 18, 2004
Posts: 19
Is there some easy HTML that will make the applet area width and height get AUTOMATICALLY set? I keep getting the numbers wrong in the HTML and the applet is not always fully shown.
(maybe I just need to set it properly? )
James Chegwidden
Ranch Hand

Joined: Oct 06, 2002
Posts: 201
Jon, This post will probably be moved to another fourm,

Most college level books are starting to use XHTML. However, as others do say HTML is still commonplace and will take awhile to covert to XHTML and eventually XML.
Here the equivalent code tags:
<applet code="WelcomeApplet.class" width=�250� height=�200�>
same as:
<object classid="java:WelcomeApplet.class" width=�250�

Should work. I teach my java students both ways.

Author and Instructor, my book
I agree. Here's the link:
subject: Quick (X)HTML Q
It's not a secret anymore!