473,569 Members | 2,400 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

run Java applet with <param> from HTML


This is simple HTML, Java but I am really confused. I include the code since
it is so small -

----------------------------------------------------------------------------

-- test.html --

<html>
<head>
<title>
run Java applet
</title>
</head>

<body>
<applet code="ContentEx tractionApplet. class" width="580" height="25">
<param name="fontName" value="Arial"/>
<param name="fontSize" value="12"/>
<param name="msg" value="http://english.pravda. ru/news/world/25-04-2007"/>
</applet>
</body>
</html>

-- ContentExtracti onApplet.java --

import java.applet.App let;
import java.awt.*;

public class ContentExtracti onApplet extends Applet {
// private representation

Label msgLabel;
Font msgFont;

/* this is called by the browsers JVM when applet is instantiated */

public void init()
{
// setting the applet Layout
setLayout(new BorderLayout()) ;

msgFont = new Font(getParamet er("fontName"), Font.BOLD,
Integer.parseIn t(getParameter( "fontSize") ));
msgLabel = new Label(getParame ter("msg"));
msgLabel.setFon t(msgFont);

add(BorderLayou t.CENTER,msgLab el);
}
}
--------------------------------------------------------------------------

The Java translates fine, and the applet runs when loaded in Mozilla Ff.

But if I replace "msg" with "message" in <paramand "msgLabel = ..." above
nothing shows up in my Ff browser :-(
Note a total of only 2 substitutions.

Any ideas what I am missing?

Thank you.

- Andrew M. Neiderer
US Army Research Laboratory
Apr 27 '07 #1
2 3506

"Andrew Neiderer " <ne******@ospre y.arl.army.milw rote in message
news:JH******** @arl.army.mil.. .
|
| This is simple HTML, Java but I am really confused. I include the code
since
| it is so small -

<snip HTML>

|
| The Java translates fine, and the applet runs when loaded in Mozilla Ff.
|
| But if I replace "msg" with "message" in <paramand "msgLabel = ..."
above
| nothing shows up in my Ff browser :-(
| Note a total of only 2 substitutions.
|
| Any ideas what I am missing?

Your code looks fine. Are you sure you're clearing the browser's cache? It
may just be running the old applet.
Apr 27 '07 #2
Followup-to set: comp.infosystem s.www.authoring.html

Andrew Neiderer wrote :
This is simple HTML, Java but I am really confused. I include the code since
it is so small -
Whenever you have a problem with a webpage, the very first things to do is
1- Validate the markup code of the page: if you find errors with that
webpage, then they have to be fixed. There is no other first steps to
perform. Removing markup errors may not fix the webpage issues or
problems but it might and it will definitely remove that source as
possible cause of the webpage's problems.

2- Validate the CSS code for the same reasons.

Most of the time (I'd say well above 75%), the layout problems can be
found and fixed with these 2 validation steps/process.

Why we won't help you by Mark Pilgrim
http://diveintomark.org/archives/200..._wont_help_you

----------------------------------------------------------------------------

-- test.html --

<html>
No doctype declaration. Your absence of doctype declaration will trigger
visual browsers into backward compatible mode (or quirks mode): in that
rendering mode, different browsers (and different versions of the same
browsers) will render webpage more differently. Instead, by declaring a
strict DTD in a doctype declaration, you would force browsers to conform
more closely to W3C web standards recommendations .
<head>
<title>
run Java applet
</title>
</head>

<body>
<applet code="ContentEx tractionApplet. class" width="580" height="25">
<param name="fontName" value="Arial"/>
Have you checked your code with the HTML 4.01 recommendation? Where do
you see that an <appletcan have nested <param>

http://www.w3.org/TR/html4/struct/ob...ml#edef-APPLET

<param name="fontSize" value="12"/>
<param name="msg" value="http://english.pravda. ru/news/world/25-04-2007"/>
</applet>
</body>
</html>
- Andrew M. Neiderer
US Army Research Laboratory
Andrew,

please visit section
Using Web Standards in your Web Pages
2 Making your page using web standards: how to
Section 2.2.4.2 What if I use <applet>?
http://developer.mozilla.org/en/docs...your_Web_Pages

Followup-to set: comp.infosystem s.www.authoring.html

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Apr 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2350
by: lvcha.gouqizi | last post by:
I embed an applet in my php script which has a parameter providing an input file for the jar. Does this file has size limit? The code is as follows: <APPLET ARCHIVE="myapplet.jar" WIDTH=372 HEIGHT=360 VSPACE=0 HSPACE=0 ALIGN=middle> <?php echo "<PARAM NAME=\"data\" VALUE=\"myfile.\">";?> when "myfile" is beyond 15M, my applet cannot...
1
1727
by: Kenneth Montgomery | last post by:
I have this embedded dropdown menu applet that is suppose to be in the navigation frame and the target URL content in the content frame. But I can't seem to the script to put the content into the right frame. The applet data .txt file is suppose to direct the browser to load the addressed content of the selected file in the right frame, but...
0
3105
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format, which needs a Quicktime plugin, and one Java applet. He's also kindly supplied me with sample HTML code for each. The code looks like this...
1
1800
by: M. Magistri | last post by:
Hi all! Why doesn't the following code load my applet under WinXP with Internet Explorer 6? <SCRIPT language="javascript" type="text/javascript"> <!-- if (getBrowser()=="IE"){ document.write("<OBJECT standby='Wait maximum 25 seconds to load........' classid='clsid:8AD9C840-044E- 11D1-B3E9-00805F499D93' WIDTH = '600' ...
0
1852
by: Daimy | last post by:
I meet the same problem below, please help me! Thanks! //written by some one I have developed a windows forms user control, which I am going to host in Internet Explorer.. I am familiar with the security settings requirement inorder to do the
0
899
by: Lloyd Sheen | last post by:
Ok, another IDE problem. Is there any way to stop the reformatting of the text in the HTML of an ASPX page???? I have an embedded object with lots of attributes / parameters and when I format it so I can see it easier then switch to design view and then back, VOILA the formatting is gone. An even worse when the project is reloaded all...
2
2338
by: Michael.Suarez | last post by:
The code in my DLL: /// <summary> /// db_task..file_master_list /// </summary> /// <param name="panConnection"> /// Pass the PanApp.Connection object by reference /// </param> /// <param name="source_id"> /// Default Value = 0
8
5895
by: Michael.Suarez | last post by:
So I wrote a DLL in 2.0. An example of one of the funtions is: /// <summary> /// db_task..file_master_list /// </summary> /// <param name="panConnection"> /// Pass the PanApp.Connection object by reference /// </param> /// <param name="source_id"> /// Default Value = 0
1
3262
by: dhillarun | last post by:
Hi all, I am displaying an applet and passing values to it by using a php file. I am sending the values to the applets by using PARAM (HTML) tag. But , I want to get some values into PHP from applet, How can we do it? Pl. do reply me.
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.