Javascript to Java using APPLET TAG

Can I call an applet method using Javascript? The applet is exposed through the <APPLET> tag. I can easily do it using MS JVM but Sun JVM doesn't let me do it. I look at the plug-in documentation and it only mention using <OBJECT> when doing Javasript to Java.
Thank you

Possibly. I've never done it myself but I've seen reference to a a Javascipt <> Java communication package on these forums before which may be what you are looking for.
Some info here:
http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/packages.htm

Similar Messages

  • Accessing a File within a zip, which was archived using Applet Tag

    Hi,
    Could Any one please tell me, How to Access a File from within an Applet. The File resides inside a zip which was Archived using <Applet> Tag.
    Actually, I want to write an application which runs both online and offline. So I have chosen Applet and All the files Which I need are zipped and is Archived through <Applet ARCHIVE="example.zip">.
    Now I want to access those XML files which are inside example.zip from my Applet.
    How can I do that?
    I think I will get security Exception.
    How to get rid of this security Exception.
    Kindly Answer soon.......
    It's very urgent.
    Thanking you,
    KumudaRaj

    Did you already try signing a jarfile? If no ->>
    You can call a class inside a jar-file within the applet.
    if this class should be able to acces files the jarfile
    first has to be signed. to do this, you must generate a key.
    the complete work:
    1. write your applet
    2. write a html-page with following code:
    <APPLET code="guestbook.class" archive="guestbook.jar" width=600 height=400></APPLET>
    3. make a zip-file with the guestbook.class, guestbook.form, guestbook$1.class, guestbook$... and rename it to guestbook.jar
    4. in the console type:
    keytool -genkey -alias YOURNAME
    5. sign the key to your jarfile with:
    jarsigner guestbook.jar YOURNAME
    6. try the applet. a warning should appear which you have to answer
    with YES then it should work
    my trouble is that i cant acces files anyway because right now i don�t
    alreadv have the clue to get the right (absolute?) path for the file. means i get an ioexception because the applet cant find the file :-((
    does anyone know how to solve this problem then? my code is:
    FileReader Stream = new FileReader("/members/Ui97u8g4f6b89mj90kh5gbr4ecf6KXC4/guestbook.txt");
    ...

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • In javascript  how to use jsp tag value

    i want to change td value while clicking the options.In the td contains jsp page.while clicking the options i want to load particular jsp within in the td.i change the td value using innerHTML by assigning value this format <jsp:include page="..."/>.It's gives some error .
    JspTranslate:Attribute has no value
    code:
    function rightPageload(strPage) {
    pageval='<jsp:include page="/jsp/library/"'+strPage+'"/>'
    document.getElementById("d1").innerHTML=pageval;
    }

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

  • JavaScript to Java with the Java Plugin, anyone?

    The java.sun.com web site seems to be teeming with docs on how to access JavaScript from Java, and the Netscape site seems to have plenty of docs on how to access Java methods from JavaScript using the browser's own JRE.
    But can one use JavaScript to access methods of a Java applet running under the Java Plugin? And if so, how?

    all the public methods and fields of an applet are exposed to javascript. In the <applet> tag, set...
    <applet ...otherinfo... mayscript></applet>, or
    <applet ...otherinfo... mayscript="true"></applet>
    I think the latter version is safer to use, as I think IE has issues if you just use the mayscript tag without the "true" value.
    So if that is set, in javascript all you have to do is address the applet, and call any of its public fields/methods. (Actually, I know you can call all public methods and I think you can call all the public fields as well...)
    var applet = self.document.applets[0];So now you can call all the public members, such as...
    applet.start();
    applet.stop();
    applet.myPublicFn1();
    applet.myPublicFn2(arg1, arg2);
    var val = applet.pubField1;etc.
    Note that if you're using Java2 (swing) thru the object/embed tags rather than just using the applet tag, things don't work that smoothly. I tried once and the applet wasn't actually found in the applets collection of the document. I tried finding the 'applet' object but had no such luck...
    Hope that helps.
    Good luck.

  • Applet - error in simple Ping program using Applet.Pls correct my error.

    Can anyone pls correct the error in the below code.
    Program : TestExec1
    Using : Applet
    Logic : Trying to display the continous pinging status in the textarea in applet, but it returns error...!
    CODING
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.*;
    /*<applet code="TestExec1" width=380 height=150>
    </applet>
    public class TestExec1 extends Applet
    String line = null;
    TextArea outputArea;
    Process p;
    public void init()
    outputArea = new TextArea(20,20);
    public void start()
    try
    Process p= Runtime.getRuntime().exec("ping 192.168.100.192 -t");BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
    while ((line = in.readLine()) != null)
    outputArea.append("\n" + line);
    System.out.println(line);
    catch (IOException e)
    e.printStackTrace();
    Error : C:\Program Files\Java\jdk1.6.0_02\bin>appletviewer TestExec1.java
    java.security.AccessControlException: access denied (java.io.FilePermission <<AL
    L FILES>> execute)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkExec(SecurityManager.java:782)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:447)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at TestExec1.start(TestExec1.java:31)
    at sun.applet.AppletPanel.run(AppletPanel.java:458)
    at java.lang.Thread.run(Thread.java:619)
    Regards
    ESM

    Will you please tell the procedure of how to use jarsigner and make a sign in for my program.
    class Name : SamplePing.java
    Using : Applet
    Manifest file : manifest.txt
    Main Class : SamplePing
    I have created jar file using the following command -
    "jar cvfm Ping.jar manifest.txt Sa*.class "
    Let me know how can i proceed further to run exec command in applet.Pls give me series of steps.
    Thanks in advance.

  • Javascript to Java (Applet) method call fails in JRE1.4.1 & NN4.79

    Win2k, Netscape 4.79, JRE 1.4.1. I'm trying to call an applet method from Javascript from the page which contains the applet. 'm using MAYSCRIPT tag. I'm getting the error "myApplet doesn'nt have any properties". (myApplet is the name of the applet). When I use the default JRE which is supported by NN4.79(Symantic JRE 1.1.5) it works well. Does JRE1.4.1 plugin doesn't support Javascript to Java calls? OR I'm doing something wrong.
    Deepak

    I'm seeing the same issue. This is supposed to work. I converted the <APPLET> tags in the HTML to use <OBJECT> and <EMBED> tags using Sun's converter (see http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/using_tags.html). I try to reference the applet (using the document.embeds[0] object instead of the document.applets[0] object) and it seems the applet has not been loaded. I can't reference any of the methods in the applet. It appears the applet has not loaded. I do not see any evidence of the applet's init() method being called.
    Have you had any luck getting this to work?

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • JavaScript won't recognize applet after using HTML Converter (please help)

    Hello friends,
    I used JavaScript to call a public method from my swing applet, which returned a string. It functioned correctly until I used the HTML Converter (a utility available from this web site, which converts the <applet> tag into <object>). Now it doesn't recognize the applet.
    Here's the JavaSript code:
    function getText(field) {
    field.value = Editor.getText(); // worked fine before converting
    // "Editor" is the name of the applet, used in the applet/object tags
    Here's the applet method:
    public String getText() {
    return "whatever";
    Now JavaScript sends an error "'Editor' is undefined"
    Any tips will be greatly appreciated. Thank you!

    Yes, the applet loads. Here's the address: (the applet is not finished, but it functions correctly)
    http://www.lordofthewebs.com/test/test1.asp - before using the converter
    http://www.lordofthewebs.com/test/test2.asp - after using the converter
    The "getText()" menthod works in IE 6.0, doesn't work in netscape (I haven't gotten to this issue yet).

  • How will the applet tag behave for users without Java?

    I am considering using an applet I have created as a splash screen for my website. But I am worried that by doing this I will loose all the visitors that don't have Java. Is there a way I can have the splash screen detect whether or not the user has Java? If so, is there a way I can have the splash screen automatically forward the non-java users to the main page? Maybe I could put something between the <applet></applet> tags?
    �Caleb�

    That doesn't help. Had you read my post more carefully you would have better understood what I wanted. In any case, I have already figured out how to automatically forward the non-Java users to the main page. The only thing I worry about now is about the people who's computers crash whenever they try to run a Java applet.
    �Caleb�

  • Java graphics app prob regarding painting........ app does NOT use applets

    Hi ,
    I basically want to write a java graphics game application ......At this point in time all I want to do is add a green rectangle to the content pane.......I can do this but I want to stick with OO concepts so I have various classes......the thing is ....when a user resizes the window the graphic I have painted dissapeared
    I will show the classes I have used and the code below......I want to do the program conforming to the way I was tought java which is to have a main controlling class that orchestrates communication between unrelated classes and their methods. In addition to my question if anyone sees stuff fundementally wrong with my code and has a better solution please feel free to enlighten me :-)
    main controlling class:
    import java.awt.Graphics;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2005</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class PoolApp {
    public PoolApp() {
    //creates new gamescreen object
    GameScreen aScreen = new GameScreen(this);
    public static void main(String[] args) {
    PoolApp poolApp1 = new PoolApp();
    public Graphics getPaintedTable(GameScreen aGameScreen) {
    Paint aPaint = new Paint(this);
    Graphics tblObj = aPaint.getTbleGraphic(aGameScreen);
    return tblObj;
    ------end main controlling class
    ------TLayer Class start
    import javax.swing.*;
    /* The purpose of this class was to create a generic frame that would
    be inherited from all screen classes ...I initially had this creating a black background that would be inherited from child classes but that created
    more problems when the screen was resized by one of the child classes*/
    public class TLayer extends JFrame {
    public TLayer() {
    -----TLayer Class end
    -----GameScreen class start--------
    public class GameScreen extends TLayer{
    private PoolApp thePoolApp;
    public GameScreen(PoolApp aPoolApp) {
    thePoolApp = aPoolApp; //set a reference from here to the controlling PoolApp initGameScreen(); //initialise and show GameScreen .....screen
    public void initGameScreen() {
    this.setSize(800,600);
    this.show();
    //now make a request to the poolapp controlling class to ask for a painted green table and get the paint class to paint it to screen
    thePoolApp.getPaintedTable(this);
    ----GameScreen class end------------
    ----PaintScreen class start-------------
    PoolApp thePoolApp;
    public Paint() {
    public Paint(PoolApp apoolApp) {
    thePoolApp = apoolApp;
    public Graphics getTbleGraphic(GameScreen aGameScreen) {
    Container theCont = aGameScreen.getContentPane(); //assign the gamescreen content pane to a container
    theCont.setSize(200,200); //set a viewable size to the container
    Graphics thetbl = theCont.getGraphics(); //get container graphics context and assign it to a graphics object
    thetbl.setColor(Color.green); //color the object
    thetbl.fillRect(30,30,20,60); //fill the rectangle
    return thetbl; //return the object
    ---PaintScreen class end---------------
    This code actually draws the green rectangle to the gamescreen from the paint class .......so it works to a degree! ......whenever I resize the window the painted image dissapears, could anyone suggest a way around this also ...am I going about this the correct way? Im open to making mass changes to better the program ......the only thing I do not want is to use applets! .....as I want to learn the fundementals of custom painting my stuff
    Any help is much needed and appreciated
    David

    Hi .....I managed to fix my problem .....but I have really had to get my head around method overiding! ......Your advice is taken onboard ...also Im going to try and find a straight forward diagram of the java graphics heirrachy ......well the parts that are reasnable to what Im doing ......Also from what I know and what you have said yes threads would definately be the way to go as far as animation and paintings concerned...I plan to do some serious research on that as I progress.
    I am going to post my basic working program ........I was wandering if you think this is an effiecent way I have done this? or if you could make any recommendations? its just I dont want to adopt this approach and find its no good when I get further into the programs development :-)) anyway heres the code :
    ------Class PoolApp start--------------
    public class PoolApp {
      public PoolApp() {
        GameScreen aGScreen = new GameScreen(this);
      public static void main(String[] args) {
        PoolApp poolApp1 = new PoolApp();
    }------Class PoolApp end--------------
    ------Class TLayer start--------------
    import javax.swing.*;
    import java.awt.Graphics;
    public class TLayer extends JFrame {
      public TLayer() {
         System.out.println("In TLayer default constructor");
         this.setSize(800,600);
    }------Class TLayer end--------------
    ------Class GameScreen start--------------
    import java.awt.Graphics;
    public class GameScreen extends TLayer {
      PoolApp thepoolApp;
      Table theTable;
      Graphics g;
      public GameScreen() {
       System.out.println("In gamescreen default constructor table");
      public GameScreen(PoolApp apoolApp) {
      thepoolApp = apoolApp;
      System.out.println("In gamescreen  constructor 2");
      addTable();
    public void addTable() {
    System.out.println("in addTable");
    this.show();
    //theTable = new Draw(this);
    //theTable.setTable();
    //theTable.paint(g);
    public void paint(Graphics g) {
         System.out.println("In Gamescreen paint ");
         theTable = new Table(this);
         theTable.paint(g);
    public void update(Graphics g) {
        System.out.println("In Gamescreen update ");
        theTable = new Table(this);
        theTable.paint(g);
    }------Class GameScreen end--------------
    ------Class Table start--------------
    import java.awt.Graphics;
    import java.awt.Container;
    import java.awt.Color;
    public class Table extends TLayer{
      GameScreen thegameScreen;
      public Table() {
          System.out.println("In Table default constructor");
      public Table(GameScreen agameScreen) {
        thegameScreen = agameScreen;
        System.out.println("In Table 2nd constructor");
      public void paint(Graphics theGraphic) {
        System.out.println("In Table paint ");
        Container tablecont = thegameScreen.getContentPane();
        theGraphic = tablecont.getGraphics();
        theGraphic.setColor(Color.green);
        theGraphic.fillRect(310,220,180,80);
      public void update(Graphics theGraphic) {
           System.out.println("In Table update");
       paint(theGraphic);
    }------Class Table end--------------
    To be honest I would rather have created a table object then added it to the content pane ....but when i did it that way ......and I resized the screen the green table graphic dissapeared .....I would also have prefered all painting of the table to be done in the table class but I had the same problem of the graphic dissapearing when the window was resized and this is the best solution I have come up with as yet ....:-) .....any recommendations are greatly appreciated
    Thanks
    David

  • How to use HTML Tags in webdynpro java

    Hi,
         Can any body tell me how to use HTML Tags in webdynpro java.
    If u provide me with sample code it will become more usefull.
    Thanks & Regards,
    SN

    HI,
    Please find the steps:
    Create a html file and store in your webdynpro project
    Add the html contents in your file
    & Create a IFRAME UI element and refer you html file
    Now you able to see the html in webdynpro
    Thanks & Regards,
    Ram

  • Devloping graphs using pure java without applets and swings

    Hi Guys
    i want to devlop bar graphs,pie charts,line graphs using pure java.i don't want to use applets and swings..does any body help on this asap..
    IT'S VERY URGENT
    cheers
    ANAND

    Go to
    http://java.sun.com/docs/books/tutorial/information/download.html#OLDui
    and get: Creating a User Interface (AWT Only) Archive (tut-OLDui.zip)

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

  • How use system.out.println with a Java Swing Applet?

    Hi guys,
    I was just wondering what can I use to view output on the Java console with a Java Swing Applet?
    At the moment I'm using a JTextArea within the Applet for debugging but I want output to appear in the browser java console but system.out.println doesn't work.
    I'm viewing the Swing Applet on Netscape 4.7 browser.
    Any ideas?

    System.out.println()s work fine! I'm guessing that your problem is that you are looking at the wrong console window!
    You're using the Java Plug-in, right? On Windows, go to your Control Panel and double click "Java Plug-in". You should find a checkbox option to "Show Java Console" - make sure this is checked. Next time you fire up you JApplet, you should see a Java Console window popup.
    Hope this helps!

Maybe you are looking for

  • BP Master Data Maintainance

    _Please provide me the solution for this Functional Requirement:_ 1. In BP Master data, where can we maintain the following: a. _Source of Data_(i.e. through lawyer,conference,Business trips,etc.,) b. Type - (i.e., Type of the Business Firm) In that

  • Save for web is very jagged

    The attached file was produced in Photoshop with the text set to "smooth" but the result when I do save for web is very jagged. How can I resolve this issue? The right is a screen shot of the name online, the left is the actual photoshop file.

  • MD5 Password Support in DS5.2

    I need to import accounts form an Oracle Directory (OID) to the Sun Directory 5.2p6. The passwords in the accounts use MD5. From what I read, MD5 is supported, but I am not finding how to configure it to work :). I do see a plugin called:NS-MTA-MD5,

  • Exchange synchronzing issues

    My Exchange information will not sync at all. There are no errors, no messages, no nothing - literally. No address book, no calendar, no notes, no e-mail account info, no nothing - literally. I sure hope Apple can help with this. Is it possibly some

  • ENQUEUE_EC_PROJ

    Hi Experts, I am facing below problem When executing the FM "ENQUEUE_EC_PROJ" in background for WBS element user status change in work flow. It is not showing any lock objects ( i am using this in the WF to Change the WBS status i.e next Approver ).