Java Applets in Netscape with EMBED   tag

Hi,
I tried to run the examples on the:
http://192.9.48.9/products/plugin/1.3/demos/applets.html
Demo paged off of the plug page and in Netscape 4.08 it
does not know there is a plugin , in Netscape 6.0
it knows there is a plug in but won't use the one installed on the machine (1.3.1) which is the same level as the demo.
Any clues how to get applets to use the Java Plugin with Netscape? This works fine in IE
Thanks!
BTW- I'm using NT 4.0 os.

Probably 1.3.1 conflicts with 1.3.1_01 or 1.3.1_02.
You need the HTML Converter from the Java PlugIn download page to make your page ready for Netscape 4.x. Go to http://java.sun.com/products/plugin/1.3/converter.html (Java Plug-in HTML Converter Download) to download your copy of the HTML Converter. Watch for the current version, it is 1.3, not 1.1.1.
Download your page, strip out the <embed/> and <object/> elements, uncomment the <applet/> element and run the HTML Converter.
Additional Information:
Netscape 6 does not use the <embed/> element anymore since it isn't a html element but was a proprietary netscape tag. Netscape 6 uses the <object/> element like Internet Explorer and Opera.
Another note on <embed/>:
Use of <embed/> is strongly discouraged, but there's no other chance. Let's hope support for Netscape 4.x won't be neccessary any more in a few months.
A note on <applet/>:
The <applet/> element is deprecated since HTML 4.01 or earlier (http://www.w3.org/TR/html401/struct/objects.html Objects in HTML 4). One should use the <object> element instead anyway. The semantic description of html elements found in the technical report of the html 4.01 recommendation is still valid for current html versions of today (XHTML 1.1 and XHTML Basic 1.0).
There's also a funny page of Sun about HTML: http://java.sun.com/products/plugin/1.3/docs/tags.html. Don't take that page too serious since it states it is talking about HTML, but it isn't.
If you use the HTML Converter, be sure to use the Extended (Standard + All Browsers/Platforms) template to tell Netscape, Opera and Internet Explorer regardless of the used version to display the applet correctly. But watch out: the generated code is not HTML and will perhaps even crash your page in Internet Explorer 6 and browsers that rely on the HTML standard! It also won't work with Netscape 6 if there is a different version of the Java Plugin installed more recently than the requested. I have SDK 1.3, 1.3.1 and 1.4 installed, and Netscape 6 wants to download the 1.3.1 Plugin.
The best way to make your applet work in really every browser is to study what the converter is trying to do and code it by yourself in a conformant way. Be sure not to tell the browser the Plugin version to use to avoid the neccessarity of downloading outdated plugins and installing several plugins (1.2, 1.2.1, 1.2.2, 1.3, 1.3.1, 1.3.1_01, 1.3.1_02, 1.4...).

Similar Messages

  • Java Applets font rendering with no AA

    So I've exhausted all possibilities on my end here and have no idea how to get anti aliasing to work with java applets. I've followed all of the suggestions from the wiki entry for the subject here:
    https://wiki.archlinux.org/index.php/Ja … ment_Fonts
    I've attached a screenshot of a few browsers and the appletviewer running a script from a book I am following at the moment. It's consistent, but it's an itch I haven't been able to scratch. OCD at it's finest here. It doesn't halt production or anything, but it bugs me.
    Thanks for any help offered!
    http://cigii.com/javajunk.png
    Moderator Edit:  Redacted in-line picture and converted it to a url link
    Last edited by ewaller (2011-12-01 04:13:44)

    transmutated:
    The picture in your original post was well beyond the size permitted by our policy.  If you would like to include a thumbnail picture, go ahead and edit that post with image tags that point to the thumbnail inside the url tags.  Have the url tags point at the big picture.  That way your readers can see the thumbnail and click through it to see the full image.
    Thanks

  • Java Applet crashes Netscape upon Exit?

    Hello, I created an Applet that I am opening in NEtscape. When I make an attempt to exit (i.e. destroy) the APplet, it crashes the whole netscape. It even happens within Netscape 7. Is there a way around this since it makes a big problem for me to use the applet if it is going to crash my Netscape browser. I`ll appreciate any suggestions or comments, thanks Ivan

    The main class that everything is in is called GUI.java and it is a frame. In order to open this as an Applet in netscape, I created a GUI_RMIApplet.java file. And The GUI_RMIApplet.html file opens the GUI_RMIApplet.java file which in return opens GUI.java. The exit call is in GUI.java file.
    The html file code is as follows:
    <EMBED type="application/x-java-applet;version=1.3" CODE = "musr.client.gui.GUI
    _RMIApplet.class" CODEBASE = "." ARCHIVE = "jar/musr.jar" NAME = "MUSR GUI APPLE
    T" WIDTH = 400 HEIGHT = 300 ALIGN = middle VSPACE = 0 HSPACE = 0 UBBoption = "de
    velop" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/pl
    ugin-install.html">
    <NOEMBED>
    The GUI_RMIApplet.java code is:
    package musr.client.gui;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import javax.swing.*;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import musr.server.*;
    public class GUI_RMIApplet extends Applet {
    boolean isStandalone = false;
    String message = "The application will launch in a separate window";
    GUI_RMIServer obj = null;
    /**Get a parameter value*/
    public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
    (getParameter(key) != null ? getParameter(key) : def);
    /**Construct the applet*/
    public GUI_RMIApplet() {
    /**Initialize the applet*/
    public void init() {
    try {
    jbInit();
    } catch (Exception e) {
    System.out.println("GUI_RMI exception: " + e.getMessage());
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() {
    // Main bulk for this applet
    GUI gui = new GUI();
    gui.setVisible(true);
    public void paint(Graphics g) {
    g.drawString(message, 25, 50);
    /**Get Applet information*/
    public String getAppletInfo() {
    return "Applet Information";
    /**Get parameter info*/
    public String[][] getParameterInfo() {
    return null;
    //static initializer for setting look & feel
    static {
    try {
    //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    catch(Exception e) {
    And, the GUI.java class calls these funcitons when exit menu button is selected:
    GUI.this.dispose(); // disposes the frame
              System.exit(-1); // disposes the applet (?or not?)
    I think the System.exit button is messing things up but I don't know what other function I can use to close teh applet.
    Hope this is enough information.

  • Problem with embed tag with PDF

    Dear All,
    I am using <embed > tag to embed the pdf file in my jsf page as below :
         <h:panelGrid border="0">
                        <h:panelGroup>
                        <h:outputText value="***********"/>
                         <f:verbatim >           
                        <embed  src="D:\Img\ppp.pdf" height="100%" width="100%" />
                             </f:verbatim>
                             <h:outputText value="##########"/>
                             </h:panelGroup>
                             <h:selectBooleanCheckbox value="true" ></h:selectBooleanCheckbox>
                        </h:panelGrid>when i run the application i am getting java script pop up with header Adobe PDF Document and message as Access denied.
    please help
    thanks in advance

    Hi Raymond ,
    It is not related to JSF actually when i use <embed> tag.if i give the path of the pdf which is in my local machine it is giving that access denied.
    I pasted that pdf in my war and it is working now

  • =3 applets hanging Netscape with 1.3.1_01a or 1.3.1_02

    The Java 2 v1.3.1_01a and 1.3.1_02 Plug-Ins completely hang Netscape 4.79 (and probably 4.x in general) and 6.2 when there are 3 or more simple applets in a single HTML page. This can be reproduced with a simple empty sub-class of java.applet.Applet and placing 3 or more instances of this in one HTML page (e.g. via jsp:plugin). [I used 16x16 applets in this case.]
    Note that I could get 3 instances of an extremely heavy, slow-loading JApplet-based applet to load without hanging Netscape, so there appears to be a timing, deadlock issue here.
    I have attempted to file a JDC bug on this matter, but it was not accepted as I could not reproduce the bug in Java 2 v1.4! Given that this issue spread to 1.3.1_02 (I originally found it in 1.3.1_01a), I am afraid it may leak into 1.4 at some later point, however!
    Has anyone else experienced this?
    Any workarounds?
    [I use extremely lightweight applets in potentially large quantities (e.g. dozens) in HTML pages.  1.3.1_01a and 1.3.1_02 are thus complete non-starters in Netscape -- and I require 1.3.x functionalities in the applet.  1.3.1_01 works beautifully in Netscape and Internet Explorer for over 150 applets in one page -- though Netscape is substantially slower than Internet Explorer in this case.  1.3.1_01a and 1.3.1_02 work beautifully in Internet Explorer -- but hang Netscape completely in this case.]

    I tried turning off Recycle ClassLoader.
    I even tried turning off the "Default VM" stuff for Netscape (as that is new to 1.3.1_01a and higher, of course).
    Neither made any significant difference. I sometimes got 3 applets to come up on a page without hanging, but visiting a couple such pages produced a nearly guaranteed hang.
    I wonder if this is related to the spurious HTTP request the Plug-In makes in Netscape.
    The Plug-In (1.3.1 and higher at least) appears to always makes 1 additional HTTP request in my experience when in Netscape as compared to Explorer. I never would have noticed this except that this request happens to hit a servlet which logs such things with a request with no path-info (and it requires path-info).

  • Java Applets not working with Firefox 5 properly

    Java Applets work sometime. But after sometime the Java icon at the bottom (near date & time) disappears. After this no matter what I do it does not work. Java Applets are used in this case to draw charts. The same charts come out properly in Internet Explorer. But I prefer using Firefox for its speed. What is the reason for this problem ?

    -> Tap ALT key or press F10 to show the Menu Bar
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update ALL your Firefox Plug-ins https://www.mozilla.com/en-US/plugincheck/
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> go to Tools Menu -> Options -> Content -> place Checkmarks on:
    1) Block Pop-up windows 2) Load images automatically 3) Enable JavaScript
    -> go to Tools Menu -> Options -> Privacy -> History section -> ''Firefox will: '''select "Remember History"'''''
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries 4) Remember Passwords for sites
    -> Click OK on Options window
    -> click the Favicon (small drop down menu icon) on Firefox SearchBar (its position is on the Right side of the Address Bar) -> click "Manage Search Engines" -> select all Unwanted Search Engines and click Remove -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

  • Java Applet Panel problems with CardLayout

    Hi, I have a problem a I have been stucked for 2 days.
    I created 3 Panels to use with CardLayout. I would switch between those 3 panels depending on user interaction. I have some textfields and text areas on the 2nd and 3rd Panel. On the 1st panel, I would like to use g.drawstring to write some stuff on that panel, but the words would be blocked off if it goes to where the components are on the other panels.
    Thanks.

    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    public class CardTest extends Applet
        Panel panel;
        CardLayout cards;
        public void init()
        {   cards = new CardLayout();
            panel = new Panel(cards);
            panel.add("one", new GraphicPanel());
            panel.add("two", getPanel("panel two"));
            panel.add("three", getPanel("panel three"));
            setLayout(new BorderLayout());
            add(getNavPanel(), "North");
            add(panel);
        private Panel getNavPanel()
            final Button
                last = new Button("last"),
                next = new Button("next");
            ActionListener l = new ActionListener()
                public void actionPerformed(ActionEvent e)
                    Button button = (Button)e.getSource();
                    if(button == last)
                        cards.previous(panel);
                    if(button == next)
                        cards.next(panel);
            last.addActionListener(l);
            next.addActionListener(l);
            Panel panel = new Panel();
            panel.add(last);
            panel.add(next);
            return panel;
        private Panel getPanel(String s)
            Panel panel = new Panel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weighty = 1.0;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            panel.add(new Button("button"), gbc);
            panel.add(new TextArea(s, 8, 16), gbc);
            return panel;
        public static void main(String[] args)
            Applet applet = new CardTest();
            Frame f = new Frame();
            f.addWindowListener(new WindowAdapter()
                public void windowClosing(WindowEvent e)
                    System.exit(0);
            f.add(applet);
            f.setSize(400,400);
            f.setLocation(200,200);
            applet.init();
            f.setVisible(true);
    class GraphicPanel extends Panel
        Font font;
        String text;
        final int PAD = 25;
        public GraphicPanel()
            font = new Font("lucida bright regular", Font.PLAIN, 22);
            text = "Hello World";
        public void paint(Graphics g)
            super.paint(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            int w = getWidth();
            int h = getHeight();
            int dia = Math.min(w,h)/6;
            g2.setPaint(Color.blue);
            g2.drawLine(PAD, PAD, w - PAD, PAD);
            g2.drawLine(PAD, h - PAD, w - PAD, h - PAD);
            g2.setPaint(Color.green.darker());
            g2.drawOval(w/2 - dia/2, h*2/3, dia, dia);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            float width = (float)font.getStringBounds(text, frc).getWidth();
            LineMetrics lm = font.getLineMetrics(text, frc);
            float x = (w - width)/2;
            float y = (h + lm.getHeight())/2 -lm.getDescent();
            g2.setPaint(Color.black);
            g2.drawString(text, x, y);
    }

  • Creating signed Java applet for Netscape 4x

    I have created a signed jar with SuperUser privileges under Netscape.
    public void init() {
    try {
    if( Class.forName("netscape.security.PrivilegeManager") != null ) {
    netscape.security.PrivilegeManager.enablePrivilege("SuperUser");
    } catch( ClassNotFoundException cnfe ) {
    cnfe.printStackTrace();
    With this I am getting following error without any dailog prompting to grant permission.
    netscape.security.ForbiddenTargetException: User didn't grant the SuperUser privilege.
    Please help.
    Thanks
    Satish

    Then it's likely Netscape 4.x doesn't recognize the jar as being signed. How did you sign the jar?
    Why didn't you ask this in the more appropriate Signed Applets forum?

  • Java applet shows basket with ? (question mark) why?

    Hi
    In one of the SRM Business Object . Approval preview shows as Question mark .
    but table wise it seems fine. why ?
    I wanted to know why i am seeing ? mark . i dont want this. i want get rid of this
    any help is appreciated.
    i wanted to recreate. any trick is appreciated.
    Muthu

    Hi Rick
    thanks much
    Are you telling that no agent find for approval ?
    now everything approved. i wanted to clear that applet question mark.
    auditor will ask me waht is this?
    is it possible to clear?
    1 Workflow started
    2. muthu raman (approver name - really approved)
    3. ? (behind cart)
    now every thing is OK. now i need to clear this question mark ( it is unwanted for me)
    appreciate your help.
    i will try to recreate this scenario .
    if i were recreated in dev. and think of to clear. since it happened in production.
    indeed appreciate your help
    worry is that after approval properly. now another applet shows question mark?
    any help is appreciated to recreate this issue. i could realise from technical person that this object was forwarde to many persons and approved. wf is a greek for me.
    n step approval by BADI ..
    muthu

  • Java Applet in a HTML page: failing with PLS-00306: wrong number of args

    We are trying to use a Java Applet in a HTML page. as our system needs to be able to retrieve a predefined set of data from a third party system that uses Dynamic Data Exchange Protocol (DDE) and are encountering errors from APEX and in IE itself.
    We are using JavaDde from www.nevaobject.com that enables our Java applet to interact with Windows applications (Third Party System) using DDE.
    This functionality is currently used in our Web Form 6i application and we are trying to use the same in the new ApEx application.
    We are using ApEx version : 2.1 and actually aer encountering 2 problems:
    Problem 1: ApEx failing with PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
    Problem 2: IE crashes if Applet used in a complex page with several regions (1 Context, 4 Report Regions, 2 level Tabs, Links)
    This problem does not occur in the page where there is only applet and one region. In the case of complex page the IE crashes if the page is reloaded
    Test scenario:
    1- Create a simple page with the HTML region.
    2- Define the Source of the above region as follows
    <OBJECT CLASSID="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    CODEBASE="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#version=1,4,0,0"
    WIDTH="1"
    HEIGHT="1"
    ID="simpleApplet"
    NAME="simpleApplet">
    <PARAM NAME="code" VALUE="simpleApplet.class" >
    <PARAM NAME="archive" VALUE="simpleApplet.jar" />
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
    </OBJECT>
    3- Create a simple Java applet "simpleApplet" - for the test its enough if the applet will have just the init method printing out the mesage to the console
    4- Create a Submit Button (not redirect) in Region Header and create unconditional (do not set When Button Pressed property) Page Branch to navigate to another page (the page without the applet)
    6- Run the page and Submit -
    The error below is returned by the engine:
    In our case our applet is called ddeApplet - I do not know why is ApEx passing the Applet's ID down to the wwv_flow.accept method as a parameter
    Tue, 24 Jul 2007 08:15:39 GMT
    ORA-06550: line 7, column 2:
    PLS-00306: wrong number or types of arguments in call to 'ACCEPT'
    ORA-06550: line 7, column 2:
    PL/SQL: Statement ignored
    DAD name: rbdev2_ax
    PROCEDURE : wwv_flow.accept
    URL : http://castor:7778/pls/rbdev2_ax/wwv_flow.accept
    PARAMETERS :
    ============
    P_FLOW_ID:
    147
    P_FLOW_STEP_ID:
    500
    P_INSTANCE:
    6986070096861669560
    P_PAGE_SUBMISSION_ID:
    1005758
    P_REQUEST:
    CRASH
    P_ARG_NAMES:
    100380029717786501
    P_T01:
    147
    P_T02:
    101
    P_T03:
    5000044
    P_T04:
    1
    P_T05:
    S
    DDEAPPLET:
    Ddeapplet[panel0,0,0,1x1,layout=java.awt.BorderLayout,rootPane=javax.swing.JRootPane[,0,0,1x1,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=385,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
    P_MD5_CHECKSUM:
    ENVIRONMENT:
    ============
    PLSQL_GATEWAY=WebDb
    GATEWAY_IVERSION=2
    SERVER_SOFTWARE=Oracle HTTP Server Powered by Apache/1.3.19 (Unix) mod_fastcgi/2.2.10 mod_perl/1.25 mod_oprocmgr/1.0
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PORT=7778
    SERVER_NAME=castor
    REQUEST_METHOD=POST
    QUERY_STRING=
    PATH_INFO=/pls/rbdev2_ax/wwv_flow.accept
    SCRIPT_NAME=/pls
    REMOTE_HOST=
    REMOTE_ADDR=192.168.66.169
    SERVER_PROTOCOL=HTTP/1.1
    REQUEST_PROTOCOL=HTTP
    REMOTE_USER=
    HTTP_CONTENT_LENGTH=661
    HTTP_CONTENT_TYPE=application/x-www-form-urlencoded
    HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    HTTP_HOST=castor:7778
    HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*
    HTTP_ACCEPT_ENCODING=gzip, deflate
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_CHARSET=
    HTTP_COOKIE=ISCOOKIE=true; LOGIN_USERNAME_COOKIE=rdanko; ORACLE_PLATFORM_REMEMBER_UN=RDANKO:ngrb; WWV_FLOW_USER2=70FBB00945FE46B9; V6_AUTHENTICATION_COOKIE=70FBB00945FE46B9
    Authorization=
    HTTP_IF_MODIFIED_SINCE=
    HTTP_REFERER=http://castor:7778/pls/rbdev2_ax/f?p=147:500:6986070096861669560:::::
    HTTP_SOAPACTION=

    "theArrow",
    It looks like whatever HTML you're including on your page is creating HTML input form elements inside the HTML form "wwv_flow". This form is posted to wwv_flow.accept, and of course, the PL/SQL procedure wwv_flow.accept doesn't know anything these additional arguments/form elements you're attempting to POST.
    Joel

  • How can i convert java application of bibeans to java applet?

    Hi Bibeans PMTeam,
    Bibeans provide two type client:java application and web client(JSP/Servlet),because web client's function is weaker than java app,so we want to convert java app to java applet,thus,we can embed java applet into web browser(our system framework is in web browser).
    That is,we want one applet client that commution with a server side service(can by socket,just like oracle 9i form service)that provide the data that applet need,or the applet connect to olap server and bibeans catalog server by socket(this need security authentication if olap server,bibeans catalog,web server is not in one machine).
    so we need you provide whole resolve scheme,thanks a lot,if this answer is not clarity,please connect:[email protected],thanks a lot!

    hi tomsong
    well, in my experience 20mb are quite large for an applet. also take into account that you need a certain jvm that supports this type of application (my guess is that internet explorers native vm isnt an option)
    i personally would tend to deliver the functionality via java webstart (look at the sunsite):so you can centrally manage the software, download it once and opertae an application on your client (i mean an APPLICATION and not an applet)
    regarding 2: well but there is NO bibean service in ias: so you have to open the former mentioned jdbc connection to the olap service from your client
    for the availability: you have to check with the pm team
    in the meantime: what about the following approach: give power users a java application and lightweight or random users a handy html client ?
    regards,
    thomas

  • Help!!! Need Java Applet to work in IE

    I found some applets (text scrollers) from the sun site that i wanted to use. downloaded them, but they do not work in IE that does not have JVM. in IE that does have JVM it says 'Java 1.1 Required' where the applet should be. is there a simple way to get sun java applets to work with IE and the MS Virtual Machine? I can't require my site visitors to have to download extra toys/plugins...

    If you are looking for a purely AWT scrolling applet. Here is one I wrote several years ago. Please note that there are some deprecated methods in it (mainly the thread start and stop methods). It will still compile though. If you want it, take it.
    Source:import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.net.*;
    public class ScrollApplet extends Applet implements Runnable
       /*=*********************
       * private data members *
       private Thread myThread = null;
       private boolean hasTextDisplayed;
       private int appletWidth, appletHeight;
       private int yPosition;
       private int xPosition;
       private Image textImage;
       private int imageWidth;
       private Graphics textGraphics;
       private Cursor oldCursor;
       private Cursor newCursor = new Cursor(Cursor.HAND_CURSOR);
       //parameters
       private int delay;
       private String displayText;
       private Color bgColor, fgColor;
       private int fontSize, fontStyle;
       private Font fontType;
       private String urlValue;
       /*=***************
       * applet methods *
       public void init()
          //assign values to private data members
          hasTextDisplayed = false;
          appletHeight = yPosition = getSize().height;
          appletWidth = xPosition = getSize().width;
          //set up the environment
          extractParameters();
          //determine the yPosition to place the image
          calculateYPosition();
          //set up the text image
          FontMetrics fm = getFontMetrics(fontType);
          imageWidth = fm.stringWidth(displayText);
          textImage = createImage(imageWidth, appletHeight);
          textGraphics = textImage.getGraphics();
          textGraphics.setColor(bgColor);
          textGraphics.fillRect(0,0,imageWidth,appletHeight);
          textGraphics.setColor(fgColor);
          textGraphics.setFont(fontType);
          textGraphics.drawString(displayText, 0, yPosition);
          oldCursor = this.getCursor();
          addMouseListener(new MouseAdapter() {
             public void mouseExited(MouseEvent e)
                if (urlValue != null) {
                   Component thisApplet = e.getComponent();
                   thisApplet.setCursor(oldCursor);
                showStatus(" ");
                myThread.resume();
             public void mouseEntered(MouseEvent e)
                myThread.suspend();
                if (urlValue != null) {
                   Component thisApplet = e.getComponent();
                   thisApplet.setCursor(newCursor);
                   showStatus(urlValue);
                else
                   showStatus("paused");
             public void mouseClicked(MouseEvent e)
                if (urlValue != null)
                   try {
                      URL u = new URL(urlValue);
                      getAppletContext().showDocument(u, "_self");
                   } catch(MalformedURLException ex) {
                   showStatus("MalformedURLException: " +ex);
       }//end init method
       public void start()
          myThread = new Thread(this);
          myThread.start();
       }//end start method
       public void update(Graphics g)
       //overwrote this method to avoid repainting of background before all text displays
          if (hasTextDisplayed == true)
             //repaint the background
             g.setColor(bgColor);
             g.fillRect(xPosition+imageWidth, 0, appletWidth - (xPosition + imageWidth),
                          appletHeight);
             g.setColor(fgColor);
          paint(g);
       }//end update method
       public void paint(Graphics g)
          setBackground(bgColor);
          g.drawImage(textImage,xPosition,0,this);
       }//end paint method
       public void stop()
       { myThread = null; }
       /*=*******************************************************************************
       * applet method getParameterInfo():                                              *
       * Returns information about the parameters that are understood by this applet.   *
       * An applet should override this method to return an array of Strings describing *
       * these parameters.  Each element of the array should be a set of three Strings  *
       * containing the name, the type, and a description.                              *
       public String[][] getParameterInfo()
          String parameterInfo[][] = {
             {"DELAYPARAM", "int", "The interval to pause in milliseconds"},
             {"TEXTPARAM", "string", "The text that will be displayed"},
             {"BGPARAM", "Color", "The bg color for the applet, in html format #FFFFFF"},
             {"FGPARAM", "Color", "The fg color for the text, in html format #FFFFFF"},
             {"FONTSIZEPARAM", "int", "The font size of the text"},
             {"FONTTYPEPARAM", "string", "The name of the font to use"},
             {"FONTSTYLEPARAM", "string", "bold, italic, or bold+italic"},
             {"URLPARAM", "string", "hyperlink"}
          return parameterInfo;
       }//end getParameterInfo method
       /*=*****************************************************************************
       * applet method getAppletInfo():                                               *
       * Returns information about this applet. An applet should override this method *
       * to return a String containing information about the author, version, and     *
       * copyright of the applet.                                                     *
       public String getAppletInfo()
          String infoAboutMe;
          infoAboutMe = new String(
             "Author:  Your Name Here/n" +
             "Description:  My first text scroller\n" +
             "Version: 1.0"
          return infoAboutMe;
       }//end getAppletInfo method
       /*=***************
       * thread methods *
       public void run()
          Thread current = Thread.currentThread();
          //loop until thread is stopped
          while (myThread == current)
             repaint();
             try {
                current.sleep(delay);
                xPosition--;
             } catch (InterruptedException e) {}
             if (xPosition <= (appletWidth - imageWidth))
                hasTextDisplayed = true;
             else
                hasTextDisplayed = false;
             if (xPosition == (0 - imageWidth))
                xPosition = appletWidth;
       }//end required run method
       /*=**********************************************************************
       * extractParameters():  Sets all parameter values, if any were provided *
       public void extractParameters()
          String delayValue = getParameter("DELAYPARAM");
          String textValue = getParameter("TEXTPARAM");
          String bgColorValue = getParameter("BGPARAM");
          String fgColorValue = getParameter("FGPARAM");
          String fontSizeValue = getParameter("FONTSIZEPARAM");
          String fontTypeValue = getParameter("FONTTYPEPARAM");
          String fontStyleValue = getParameter("FONTSTYLEPARAM");
          String urlParam = getParameter("URLPARAM");
          //set delay to one tenth of a second if missing parameter
          delay = ((delayValue == null) ? 100 : Integer.parseInt(delayValue));
          urlValue = (urlParam == null ? null : urlParam);
          displayText = ((textValue == null) ?
                new String("NO TEXT WAS PROVIDED!") :
                textValue);
          bgColor = determineColor(bgColorValue);
          fgColor = determineColor(fgColorValue);
          fontStyle = determineFontStyle(fontStyleValue);
          fontSize = ((fontSizeValue == null) ? 12 : Integer.parseInt(fontSizeValue));
          fontType = new Font(fontTypeValue, fontStyle, fontSize);
       }//end extractParameters method
       /*=*************************************************
       * determineColor():  returns the appropriate color *
       public Color determineColor(String value)
          return parseHTMLHex(value);
       }//end determineColor method
       /*=*****************************************************************************
       * parseHTMLHex(): parses an HTML hex (eg #FFFFFF) and returns the Color object *
       public static Color parseHTMLHex(String htmlHex) {
          Color color = new Color(220,220,220);  //default grey
          if (htmlHex != null) {
             String red = htmlHex.substring(1,3);
             String green = htmlHex.substring(3,5);
             String blue = htmlHex.substring(5);
             color = new Color(Integer.parseInt(red,16),
                           Integer.parseInt(green,16),
                           Integer.parseInt(blue,16));
          }//end if
          return color;
       }//end parseHTMLHex method
       /*=******************************************
       * determineFontStyle():  returns font sytle *
       public int determineFontStyle(String value)
          int returnVal;
          if (value == null)
             returnVal = Font.PLAIN;
          else if (value.equalsIgnoreCase("plain"))
             returnVal = Font.PLAIN;
          else if (value.equalsIgnoreCase("bold"))
             returnVal = Font.BOLD;
          else if (value.equalsIgnoreCase("italic"))
             returnVal = Font.ITALIC;
          else if (value.equalsIgnoreCase("bold+italic"))
             returnVal = Font.BOLD + Font.ITALIC;
          else
             returnVal = Font.PLAIN;
          return returnVal;
       }//end determineFontStyle method
       /*=**********************************************************
       * calculateYPosition(): want text to be in middle of applet *
       public void calculateYPosition()
          //wasYPositionCalculated = true;
          //make calculations to center font in applet window
          int appletMidHeight = appletHeight / 2;         //the middle of the applet
          FontMetrics fm = getFontMetrics(fontType);    //font metrics for current font
          int fontMidHeight = fm.getAscent() / 2;         //the middle of the font
          int currentFontSizeValue;                       //temp value for font size
          //if the font size if too big, fix it
          if ((currentFontSizeValue = fm.getAscent()) > appletHeight)
             //cycle through font sizes until find one that fits
             while (currentFontSizeValue > appletHeight)
                fontType = new Font(getParameter("FONTTYPEPARAM"), fontStyle, --fontSize);
                fm = getFontMetrics(fontType);
                currentFontSizeValue = fm.getAscent();
             //set the new values for the new font
             setFont(fontType);
             fm = getFontMetrics(fontType);
             fontMidHeight = fm.getAscent() / 2;
          yPosition = appletMidHeight + fontMidHeight - 3;
       }//end calculateYPosition()
    }//end applethtml:<HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>Test scroller applet</title>
    </head>
    <BODY>
    <h1>Scroller Applet</h1>
    <!--CODEBASE = "."-->
    <APPLET
      CODE     = "ScrollApplet.class"
      NAME     = "TestApplet"
      WIDTH    = 400
      HEIGHT   = 30
      HSPACE   = 0
      VSPACE   = 0
      ALIGN    = middle
    >
    <PARAM NAME="DELAYPARAM" VALUE="10">
    <PARAM NAME="TEXTPARAM" VALUE="Simple Old Scrolling Applet?">
    <PARAM NAME="BGPARAM" VALUE="#000000">
    <PARAM NAME="FGPARAM" VALUE="#CCCCCC">
    <PARAM NAME="FONTSIZEPARAM" VALUE="24">
    <PARAM NAME="FONTTYPEPARAM" VALUE="TimesRoman">
    <PARAM NAME="FONTSTYLEPARAM" VALUE="italic">
    <PARAM NAME="URLPARAM" VALUE="http://quote.yahoo.com/quotes?SYMBOLS=DISH">
    </applet>
    </body>
    </html>tajenkins

  • Embed tag is not working with Mozilla Firefox 23, 24 and 25

    Requirement:
    While loading the java applet on a page, if the user system do not have plugin loaded then our code should redirect the user to get Java 1.6 plugin.
    At present I am using below two URL for automatically JRE6 download
    • IE : https://java.sun.com/update/1.6.0/jinstall-6-windows-i586.cab#Version=1,6,0,31<br />
    [When user tries to access the applet page from IE browser then he/she is getting pop-up message for JRE6 installation, provided that the user system don’t have any JRE installed]. This scenario is working IE8,9,10<br />
    • Mozilla family : https://javadl.sun.com/webapps/download/AutoDL?BundleId=60336
    Below is the used script for ‘Object’ and ‘embed’ tag:
    <pre><nowiki><script language="javascript" >
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="OrderApplet"';
    WIDTH = 775 HEIGHT = 600
    codebase="https:\/\/java.sun.com\/update\/1.6.0\/jinstall-6-windows-i586.cab">';
    <PARAM NAME = "type" VALUE="application\/x-java-applet;version=1.6.0_31">';
    <PARAM NAME = "scriptable" VALUE = "true" >';
    <COMMENT>';
    <EMBED type="application\/x-java-applet;version=1.6"
    pluginspage="https:\/\/javadl.sun.com\/webapps\/download\/AutoDL?BundleId=60336">
    <NOEMBED>
    <\/COMMENT>;
    <\/NOEMBED><\/EMBED>;
    <\/OBJECT>;
    </script></nowiki></pre>
    User is getting pop-up message for JRE6 installation with browser IE8, 9, and 10 and also with Mozilla Firefox 22, but it’s failing with latest version of Mozilla Firefox23,24 and 25.
    I have gone through so many sites but could find any reason for this behavior.
    I have provided JRE6 32-bit version download URL, here I don’t think so I’m doing any version incompatibility because both the JRE6 and Mozilla Firefox are 32-bit version. And 64 bit Firefox version is not available for windows.
    I’m not sure why the code is working with Firefox 22 and its lower version but
    doesn’t work with higher version than firefox22….like 23,24,25
    Can anyone help to sort out this issue?
    Thanks, <br />
    Sumit

    Sorry for the delay in getting an answer, yesterday was a holiday in the USA.
    This forum is for Firefox user support, not for web developer support. My rough guess is that since Mozilla has blocked all but the most recent update for Java 7 Plugins - https://addons.mozilla.org/en-US/firefox/blocked/ - and Firefox 23 brought in a new '''Simplified interface for notifications of plugin installation''' - http://www.mozilla.org/en-US/firefox/23.0/releasenotes/ - that is probably why you're having a problem with versions of Firefox after Firefox 22.
    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    ''You'll need to register and login to be able to post in that forum''.

  • Java Applets won't load in Netscape 4

    Hello,
    No java applets will load in Netscape 4. I checked to see if java plugins existed and they do I actually have about 4 different versions installed on my computer because I have been trying to resolve this issue. I looked in the browsers plugins directory it contains four java .dll files. Does anybody know whats going on? In internet explorer java applets load correctly.
    Thank You,
    Mark

    Perhaps it is due to your HTML code in the webpage? If you use the <APPLET> tag only, the applet may not run in all browser/platform. You can use HtmlConverter that comes with JDK/JRE 1.4 in order to generate HTML code which allows your applet to run in any browser/platform.
    Hope it helps,
    A.A.
    Hello,
    No java applets will load in Netscape 4. I checked to
    see if java plugins existed and they do I actually
    have about 4 different versions installed on my
    computer because I have been trying to resolve this
    issue. I looked in the browsers plugins directory it
    contains four java .dll files. Does anybody know whats
    going on? In internet explorer java applets load
    correctly.
    Thank You,
    Mark

  • Applet doesn't work with object tags--PLZ HELP!

    <NOEMBED>
    </NOEMBED>
    </EMBED>
    </COMMENT>
    </OBJECT>

    ooops! The applet is not displayed with object tags generated by HtmlConverter utility, The applet is supposed to display a JTable and connect to Oracle DB using JDBC. The web server is Tomcat 4.1.29
    <OBJECT
        classid = "clsid:CAFEEFAC-0014-0001-0002-BBCDEFFEDCBA"
        codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_4_1_02a-windows-i586.cab#Version=1,4,1,21"
        WIDTH = 800 HEIGHT = 500 NAME = "Edit Trunks" >
        <PARAM NAME = CODE VALUE = "cbhtolApplet.class" >
        <PARAM NAME = ARCHIVE VALUE = "trnkapplet.jar,ojdbc14.jar" >
        <PARAM NAME = NAME VALUE = "Edit Trunks" >
        <PARAM NAME = "type" VALUE = "application/x-java-applet;jpi-version=1.4.1_02a">
        <PARAM NAME = "scriptable" VALUE = "false">
        <COMMENT>
            <EMBED
                type = "application/x-java-applet;jpi-version=1.4.1_02a"
                CODE = "cbhtolApplet.class"
                ARCHIVE = "trnkapplet.jar,ojdbc14.jar"
                NAME = "Edit Trunks"
                WIDTH = 800
                HEIGHT = 500
                scriptable = false
               pluginspage = "http://java.sun.com/products/plugin/index.html#download">
                <NOEMBED>
                </NOEMBED>
            </EMBED>
        </COMMENT>
    </OBJECT>Appreciate your help!

Maybe you are looking for